[PATCH] D46614: [clang] Adding CharacteristicKind to PPCallbacks::InclusionDirective

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 9 08:59:40 PDT 2018


aaron.ballman added inline comments.


================
Comment at: unittests/Lex/PPCallbacksTest.cpp:142-143
   // the InclusionDirective callback.
-  CharSourceRange InclusionDirectiveFilenameRange(const char* SourceText, 
-      const char* HeaderPath, bool SystemHeader) {
+  InclusionDirectiveCallbacks *
+  InclusionDirectiveCallback(const char *SourceText,
+                                  const char *HeaderPath, bool SystemHeader) {
----------------
aaron.ballman wrote:
> The formatting looks off here, did clang-format do this?
It would probably be cleaner to provide the old interface as well, but define it to:
```
CharSourceRange InclusionDirectiveFilenameRange(const char* SourceText, const char* HeaderPath, bool SystemHeader) {
  return InclusionDirectiveCallback(SourceText, HeaderPath, SystemHeader)->FilenameRange;
}
```


================
Comment at: unittests/Lex/PPCallbacksTest.cpp:142-144
+  InclusionDirectiveCallbacks *
+  InclusionDirectiveCallback(const char *SourceText,
+                                  const char *HeaderPath, bool SystemHeader) {
----------------
The formatting looks off here, did clang-format do this?


https://reviews.llvm.org/D46614





More information about the cfe-commits mailing list