diff options
| author | Richard Trieu <rtrieu@google.com> | 2011-06-10 03:11:26 +0000 |
|---|---|---|
| committer | Richard Trieu <rtrieu@google.com> | 2011-06-10 03:11:26 +0000 |
| commit | caa33d36fb3f126d9cbe854793ca617d05170255 (patch) | |
| tree | 5f567e60febf67329e1bd9594d31300776e9f1b5 /clang/lib/Sema/TreeTransform.h | |
| parent | 19d5253f60ed711fecad148194581bda3fe18aa8 (diff) | |
| download | bcm5719-llvm-caa33d36fb3f126d9cbe854793ca617d05170255.tar.gz bcm5719-llvm-caa33d36fb3f126d9cbe854793ca617d05170255.zip | |
Made changes to how 'struct'/'class' mismatches are handled in -Wmismatched-tags.
- Removed fix-it hints from template instaniations since changes to the
templates are rarely helpful.
- Changed the caret in template instaniations from the class/struct name to the
class/struct keyword, matching the other warnings.
- Do not offer fix-it hints when multiple declarations disagree. Warnings are
still given.
- Once a definition is found, offer a fix-it hint to all previous declarations
with wrong tag.
- Declarations that disagree with a previous definition will get a fix-it hint
to change the declaration.
llvm-svn: 132831
Diffstat (limited to 'clang/lib/Sema/TreeTransform.h')
| -rw-r--r-- | clang/lib/Sema/TreeTransform.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h index 06017e7cbab..245499e8a1c 100644 --- a/clang/lib/Sema/TreeTransform.h +++ b/clang/lib/Sema/TreeTransform.h @@ -879,7 +879,8 @@ public: return QualType(); } - if (!SemaRef.isAcceptableTagRedeclaration(Tag, Kind, IdLoc, *Id)) { + if (!SemaRef.isAcceptableTagRedeclaration(Tag, Kind, /*isDefinition*/false, + IdLoc, *Id)) { SemaRef.Diag(KeywordLoc, diag::err_use_with_wrong_tag) << Id; SemaRef.Diag(Tag->getLocation(), diag::note_previous_use); return QualType(); |

