[PATCH] D75844: [clang] Set begin loc on GNU attribute parsed attrs

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 23 13:38:46 PDT 2020


aaron.ballman added inline comments.


================
Comment at: clang/test/SemaCXX/switch-implicit-fallthrough.cpp:110-114
+    case 26:
+      return 0;
+    __attribute__((fallthrough)); // expected-warning{{fallthrough annotation in unreachable code}}
+    case 27:
+      break;
----------------
tbaeder wrote:
> aaron.ballman wrote:
> > This test seems unrelated to the patch, or am I misunderstanding something?
> This is the test that prompted me to write this patch - before this patch, the error message has an invalid loc. I guess I should remove this here and move it over to the source ranges tests and also test that is has the right source range.
Ah, yeah, you should probably add this to the source range tests. If the current test here would have failed without the patch, it's also perfectly reasonable to leave this test here as well.


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

https://reviews.llvm.org/D75844





More information about the cfe-commits mailing list