[PATCH] D22805: [clang-include-fixer] Added Emacs integration for clang-include-fixer.

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 26 08:55:37 PDT 2016


hokein added inline comments.

================
Comment at: include-fixer/tool/clang-include-fixer.el:126
@@ +125,3 @@
+  (setq header-infos (plist-get include-fixer-context :HeaderInfos))
+  (setq symbol (plist-get include-fixer-context :SymbolIdentifier))
+  (setq symbol-offset (plist-get (plist-get include-fixer-context :Range)
----------------
Looks like you are using an old-version of clang-include-fixer. It won't work with latest version. The latest clang-include-fixer changes this interfaces for supporting adding qualifiers for all instances of an unidentified symbol. So please update to use the latest version.

You can refer to the change of "tool/clang-include-fixer.py" in https://reviews.llvm.org/D22567.

PS. The "-output-header" option is changed from

```
{
   "SymbolIdentifier": "foo",
   "Range": {"Offset":0, "Length": 3},
   "HeaderInfos": [ {"Header": "\"foo_a.h\"",
                               "QualifiedName": "a::foo"} ]
}
```

to 

```
 {
    "QuerySymbolInfos": [
       {"RawIdentifier": "foo",
        "Range": {"Offset": 0, "Length": 3}}
    ],
     "HeaderInfos": [ {"Header": "\"foo_a.h\"",
                                "QualifiedName": "a::foo"} ]
 }
```


https://reviews.llvm.org/D22805





More information about the cfe-commits mailing list