[PATCH] D33207: Fix an assertion failure in FormatASTNodeDiagnosticArgument.
Alexander Kornienko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 17 20:15:49 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL303325: Fix an assertion failure in FormatASTNodeDiagnosticArgument. (authored by alexfh).
Changed prior to commit:
https://reviews.llvm.org/D33207?vs=99112&id=99386#toc
Repository:
rL LLVM
https://reviews.llvm.org/D33207
Files:
cfe/trunk/lib/Sema/SemaDecl.cpp
cfe/trunk/test/SemaCXX/warn-shadow.cpp
Index: cfe/trunk/lib/Sema/SemaDecl.cpp
===================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp
+++ cfe/trunk/lib/Sema/SemaDecl.cpp
@@ -6935,7 +6935,7 @@
}
}
- DeclContext *OldDC = ShadowedDecl->getDeclContext();
+ DeclContext *OldDC = ShadowedDecl->getDeclContext()->getRedeclContext();
unsigned WarningDiag = diag::warn_decl_shadow;
SourceLocation CaptureLoc;
Index: cfe/trunk/test/SemaCXX/warn-shadow.cpp
===================================================================
--- cfe/trunk/test/SemaCXX/warn-shadow.cpp
+++ cfe/trunk/test/SemaCXX/warn-shadow.cpp
@@ -206,3 +206,10 @@
}
}
+
+extern "C" {
+typedef int externC; // expected-note {{previous declaration is here}}
+}
+void handleLinkageSpec() {
+ typedef void externC; // expected-warning {{declaration shadows a typedef in the global namespace}}
+}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33207.99386.patch
Type: text/x-patch
Size: 889 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170518/cd47499c/attachment.bin>
More information about the cfe-commits
mailing list