[llvm-branch-commits] [cfe-branch] r128364 - in /cfe/branches/release_29: ./ lib/Sema/IdentifierResolver.cpp test/SemaCXX/goto.cpp test/SemaCXX/goto2.cpp test/SemaCXX/warn-unreachable.cpp
Bill Wendling
isanbard at gmail.com
Sat Mar 26 17:55:06 PDT 2011
Author: void
Date: Sat Mar 26 19:55:05 2011
New Revision: 128364
URL: http://llvm.org/viewvc/llvm-project?rev=128364&view=rev
Log:
Missed merge that goes with the merge of r128210.
--- Merging r128208 into '.':
U test/SemaCXX/goto.cpp
A test/SemaCXX/goto2.cpp
U lib/Sema/IdentifierResolver.cpp
Added:
cfe/branches/release_29/test/SemaCXX/goto2.cpp
- copied unchanged from r128208, cfe/trunk/test/SemaCXX/goto2.cpp
Modified:
cfe/branches/release_29/ (props changed)
cfe/branches/release_29/lib/Sema/IdentifierResolver.cpp
cfe/branches/release_29/test/SemaCXX/goto.cpp
cfe/branches/release_29/test/SemaCXX/warn-unreachable.cpp (props changed)
Propchange: cfe/branches/release_29/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Mar 26 19:55:05 2011
@@ -1,3 +1,3 @@
-/cfe/trunk:127238,127283-127284,127308,127326,127329,127373,127405,127460,127507,127512,127541,127543,127563,127580,127582-127583,127622-127623,127652,127654-127655,127729,127736-127738,127806,127811,127860-127861,127971,127980,128102,128104,128210
+/cfe/trunk:127238,127283-127284,127308,127326,127329,127373,127405,127460,127507,127512,127541,127543,127563,127580,127582-127583,127622-127623,127652,127654-127655,127729,127736-127738,127806,127811,127860-127861,127971,127980,128102,128104,128208,128210
/cfe/trunk/test/SemaTemplate:126920
/llvm/trunk:127238,127329,127652,127654-127655
Modified: cfe/branches/release_29/lib/Sema/IdentifierResolver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_29/lib/Sema/IdentifierResolver.cpp?rev=128364&r1=128363&r2=128364&view=diff
==============================================================================
--- cfe/branches/release_29/lib/Sema/IdentifierResolver.cpp (original)
+++ cfe/branches/release_29/lib/Sema/IdentifierResolver.cpp Sat Mar 26 19:55:05 2011
@@ -172,13 +172,28 @@
DeclarationName Name = D->getDeclName();
void *Ptr = Name.getFETokenInfo<void>();
- if (Pos == iterator() || isDeclPtr(Ptr)) {
- // Simple case: insert at the end of the list (which is the
- // end of the stored vector).
+ if (!Ptr) {
AddDecl(D);
return;
}
+ if (isDeclPtr(Ptr)) {
+ // We only have a single declaration: insert before or after it,
+ // as appropriate.
+ if (Pos == iterator()) {
+ // Add the new declaration before the existing declaration.
+ NamedDecl *PrevD = static_cast<NamedDecl*>(Ptr);
+ RemoveDecl(PrevD);
+ AddDecl(D);
+ AddDecl(PrevD);
+ } else {
+ // Add new declaration after the existing declaration.
+ AddDecl(D);
+ }
+
+ return;
+ }
+
if (IdentifierInfo *II = Name.getAsIdentifierInfo())
II->setIsFromAST(false);
Modified: cfe/branches/release_29/test/SemaCXX/goto.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_29/test/SemaCXX/goto.cpp?rev=128364&r1=128363&r2=128364&view=diff
==============================================================================
--- cfe/branches/release_29/test/SemaCXX/goto.cpp (original)
+++ cfe/branches/release_29/test/SemaCXX/goto.cpp Sat Mar 26 19:55:05 2011
@@ -13,6 +13,26 @@
return;
}
+namespace N {
+ float* end;
+ void f(bool b1, bool b2) {
+ {
+ do {
+ int end = 0;
+ if (b2) {
+ do {
+ goto end;
+ } while (b2);
+ }
+ end = 1;
+ } while (b1);
+ }
+
+ end:
+ return;
+ }
+}
+
void g() {
end = 1; // expected-error{{assigning to 'double *' from incompatible type 'int'}}
}
Propchange: cfe/branches/release_29/test/SemaCXX/warn-unreachable.cpp
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Mar 26 19:55:05 2011
@@ -1 +1 @@
-/cfe/trunk/test/SemaCXX/warn-unreachable.cpp:121961,127238,127283-127284,127308,127326,127329,127373,127405,127460,127507,127512,127541,127543,127563,127580,127582-127583,127622-127623,127652,127654-127655,127729,127736-127738,127806,127811,127860-127861,127971,127980,128102,128104,128210
+/cfe/trunk/test/SemaCXX/warn-unreachable.cpp:121961,127238,127283-127284,127308,127326,127329,127373,127405,127460,127507,127512,127541,127543,127563,127580,127582-127583,127622-127623,127652,127654-127655,127729,127736-127738,127806,127811,127860-127861,127971,127980,128102,128104,128208,128210
More information about the llvm-branch-commits
mailing list