[PATCH] D68581: Include leading attributes in DeclStmt's SourceRange

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 16 08:09:01 PDT 2019


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM, assuming the requested test changes are as successful as I expect they will be (doesn't need additional review if the tests pass).



================
Comment at: clang/test/AST/sourceranges.cpp:155
+
+#if __cplusplus >= 201703L
+  void cpp17() {
----------------
Why is this guarded on C++17? `[[maybe_unused]]` is supported in every language mode used by this test (it generates a warning, but we're FileCheck'ing so that's fine -- but you could use `[[deprecated("")]]` instead if you want).

Additionally, I'd appreciate one more test case testing a `__declspec` attribute as well, to make sure we're handling that properly as well.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68581/new/

https://reviews.llvm.org/D68581





More information about the cfe-commits mailing list