[PATCH] D30854: [ASTMatchers] Add ObjC matchers for fundamental decls

Dave Lee via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 14 09:43:08 PDT 2017

kastiglione added inline comments.

Comment at: unittests/ASTMatchers/ASTMatchersNodeTest.cpp:1547
+  std::string ObjCString =
+    "#pragma clang diagnostic ignored \"-Wobjc-root-class\"\n"
+    "@protocol Proto "
kastiglione wrote:
> aaron.ballman wrote:
> > Instead of using a pragma for this, I think it would make more sense to just modify `matchesObjC()` to disable the diagnostic. This is only intended to test the dynamic AST matchers, so the diagnostics are not useful in that case anyway.
> `matchesConditionally()` accepts only one compiler arg, so putting the diagnostics here was a smaller change than refactoring that function. Do you think it would be better to refactor `matchesConditionally()`?
I notice that many other tests have warnings. Should these tests just allow the warnings to be emitted?


More information about the cfe-commits mailing list