[PATCH] D33841: [clang-tidy] redundant keyword check

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 14 16:08:59 PDT 2017


aaron.ballman added inline comments.


================
Comment at: clang-tidy/readability/RedundantKeywordCheck.cpp:22
+template <class T>
+static bool startsWith(const T &Node, StringRef Value) {
+  Token Result;
----------------
Why do you need to do a textual search that the first token in the declaration is extern or inline? That seems like it would fail on common cases that you would expect to catch:
```
#define FOO_EXTERN extern

FOO_EXTERN void blah();
```


================
Comment at: test/clang-tidy/readability-redundant-keyword.cpp:22
+
+extern "C" void ok();
+
----------------
Why is this okay, but the following is not?
```
extern "C++" void ok2();
```


Repository:
  rL LLVM

https://reviews.llvm.org/D33841





More information about the cfe-commits mailing list