[PATCH] D124258: [C89/C2x] Change the behavior of implicit int diagnostics
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 28 10:24:56 PDT 2022
aaron.ballman added inline comments.
================
Comment at: clang/unittests/AST/SourceLocationTest.cpp:135-145
TEST(ParmVarDecl, KNRLocation) {
LocationVerifier<ParmVarDecl> Verifier;
- Verifier.expectLocation(1, 8);
- EXPECT_TRUE(Verifier.match("void f(i) {}", varDecl(), Lang_C99));
+ Verifier.expectLocation(1, 15);
+ EXPECT_TRUE(Verifier.match("void f(i) int i; {}", varDecl(), Lang_C99));
}
TEST(ParmVarDecl, KNRRange) {
----------------
tahonermann wrote:
> Perhaps preserve the prior tests (switched to `Lang_C89`) and then add these tests? That would ensure locations stay correct for both declaration forms.
Good suggestion! I've done that.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124258/new/
https://reviews.llvm.org/D124258
More information about the cfe-commits
mailing list