[cfe-commits] r112365 - in /cfe/trunk: lib/AST/ASTDiagnostic.cpp test/SemaObjCXX/message.mm
Gabor Greif
ggreif at gmail.com
Sat Aug 28 03:40:52 PDT 2010
Author: ggreif
Date: Sat Aug 28 05:40:52 2010
New Revision: 112365
URL: http://llvm.org/viewvc/llvm-project?rev=112365&view=rev
Log:
suppress annoying textual repetition as 'aka'
Modified:
cfe/trunk/lib/AST/ASTDiagnostic.cpp
cfe/trunk/test/SemaObjCXX/message.mm
Modified: cfe/trunk/lib/AST/ASTDiagnostic.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTDiagnostic.cpp?rev=112365&r1=112364&r2=112365&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTDiagnostic.cpp (original)
+++ cfe/trunk/lib/AST/ASTDiagnostic.cpp Sat Aug 28 05:40:52 2010
@@ -151,10 +151,13 @@
bool ShouldAKA = false;
QualType DesugaredTy = Desugar(Context, Ty, ShouldAKA);
if (ShouldAKA) {
- S = "'"+S+"' (aka '";
- S += DesugaredTy.getAsString(Context.PrintingPolicy);
- S += "')";
- return S;
+ std::string D = DesugaredTy.getAsString(Context.PrintingPolicy);
+ if (D != S) {
+ S = "'" + S + "' (aka '";
+ S += D;
+ S += "')";
+ return S;
+ }
}
}
Modified: cfe/trunk/test/SemaObjCXX/message.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjCXX/message.mm?rev=112365&r1=112364&r2=112365&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjCXX/message.mm (original)
+++ cfe/trunk/test/SemaObjCXX/message.mm Sat Aug 28 05:40:52 2010
@@ -38,7 +38,7 @@
return 0;
}
+ (void)method {
- [ivar method]; // expected-error{{receiver type 'ivar' (aka 'ivar') is not an Objective-C class}}
+ [ivar method]; // expected-error{{receiver type 'ivar' is not an Objective-C class}}
}
@end
More information about the cfe-commits
mailing list