- May 09, 2012
-
-
Argyrios Kyrtzidis authored
in ObjCMethodDecl to indicate whether the method does not override any other method, which is the majority of cases. That way we can avoid unnecessary work doing lookups, especially when PCH is involved. rdar://11360082 llvm-svn: 156476
-
Ted Kremenek authored
Teach IsTailPaddedMemberArray() (used by -Warray-bounds) that a FieldDecl may have a Typedef type, and not always a ConstantArrayType. Fixes <rdar://problem/11387038>. llvm-svn: 156464
-
Richard Smith authored
candidate template ignored: substitution failed [with T = int]: no type named 'type' in 'std::enable_if<false, void>' Instead, just say: candidate template ignored: disabled by 'enable_if' [with T = int] ... and point at the enable_if condition which (we assume) failed. This is applied to all cases where the user writes 'typename enable_if<...>::type' (optionally prefixed with a nested name specifier), and 'enable_if<...>' names a complete class type which does not have a member named 'type', and this results in a candidate function being ignored in a SFINAE context. Thus it catches 'std::enable_if', 'std::__1::enable_if', 'boost::enable_if' and 'llvm::enable_if'. llvm-svn: 156463
-
Richard Trieu authored
Added support for conditional operators and tightened the exclusion of the unary operator from all operators to only the address of operator. llvm-svn: 156450
-
- May 08, 2012
-
-
John McCall authored
@throw expression; l2r conversion can introduce new cleanups in certain cases, like when the expression is an ObjC property reference of retainable type in ARC. llvm-svn: 156425
-
Fariborz Jahanian authored
llvm-svn: 156391
-
Jordy Rose authored
Includes a real potential initialization problem. llvm-svn: 156363
-
Rafael Espindola authored
llvm-svn: 156348
-
Rafael Espindola authored
match gcc behavior for two conflicting visibilities in the same decl. It also makes handling of dllimport/dllexport more natural. As a bonus we now warn on the dllimport in void __attribute__((dllimport)) foo13(); void __attribute__((dllexport)) foo13(); as does gcc. llvm-svn: 156343
-
- May 07, 2012
-
-
Richard Smith authored
overload candidate, and include its message in any subsequent 'candidate not viable due to substitution failure' note we may produce. To keep the note small (since the 'overload resolution failed' diagnostics are often already very verbose), the text of the SFINAE diagnostic is included as part of the text of the note, and any notes which were attached to it are discarded. There happened to be spare space in OverloadCandidate into which a PartialDiagnosticAt could be squeezed, and this patch goes to lengths to avoid unnecessary PartialDiagnostic copies, resulting in no slowdown that I could measure. (Removal in passing of some PartialDiagnostic copies has resulted in a slightly smaller clang binary overall.) Even on a torture test, I was unable to measure a memory increase of above 0.2%. llvm-svn: 156297
-
John McCall authored
so that we actually accumulate all the delayed diagnostics. Do this so that we can restore those diagnostics to good standing if it turns out that we were wrong to suppress, e.g. if the tag specifier is actually an elaborated type specifier and not a declaration. llvm-svn: 156291
-
John McCall authored
llvm-svn: 156290
-
John McCall authored
separate pools owned by the RAII objects that keep pushing decl state. This gives us quite a bit more flexibility. llvm-svn: 156289
-
Richard Smith authored
in-class initializer for one of its fields. Value-initialization of such a type should use the in-class initializer! The former was just a bug, the latter is a (reported) standard defect. llvm-svn: 156274
-
Aaron Ballman authored
Detecting illegal instantiations of abstract types when using a function-style cast. Fixed PR12658. llvm-svn: 156271
-
- May 06, 2012
-
-
Rafael Espindola authored
for having a uniform logic for adding attributes to a decl. This in turn is needed to fix the FIXME: // FIXME: This needs to happen before we merge declarations. Then, // let attribute merging cope with attribute conflicts. ProcessDeclAttributes(S, NewFD, D, /*NonInheritable=*/false, /*Inheritable=*/true); The idea is that mergeAvailabilityAttr will become a method. Once attributes are processed before merging, it will be called from handleAvailabilityAttr to handle multiple attributes in one decl: void f(int) __attribute__((availability(ios,deprecated=3.0), availability(ios,introduced=2.0))); and from SemaDecl.cpp to handle multiple decls: void f(int) __attribute__((availability(ios,deprecated=3.0))); void f(int) __attribute__((availability(ios,introduced=2.0))); As a bonus, use the new structure to diagnose incompatible availability attributes added to different decls (see included testcases). llvm-svn: 156269
-
- May 05, 2012
-
-
Argyrios Kyrtzidis authored
to get a const char* if necessary. This avoids unnecessary conversions when we want to use the result of getName as a StringRef. Part of rdar://10796159 llvm-svn: 156227
-
Douglas Gregor authored
Sema::ConvertToIntegralOrEnumerationType() from PartialDiagnostics to abstract "diagnoser" classes. Not much of a win here, but we're -several PartialDiagnostics. llvm-svn: 156217
-
- May 04, 2012
-
-
Jean-Daniel Dupas authored
Add a test case for the related NSAssert workaround. llvm-svn: 156205
-
Sean Callanan authored
getTypeSourceInfo() without checking for NULL. FieldDecls may have NULL TypeSourceInfo, and in fact some FieldDecls generated by Clang -- and all FieldDecls generated by LLDB -- have no TypeSourceInfo. This patch makes IsTailPaddedMemberArray check for NULL. llvm-svn: 156186
-
Douglas Gregor authored
llvm-svn: 156180
-
Douglas Gregor authored
llvm-svn: 156178
-
Douglas Gregor authored
off PartialDiagnostic. PartialDiagnostic is rather heavyweight for something that is in the critical path and is rarely used. So, switch over to an abstract-class-based callback mechanism that delays most of the work until a diagnostic is actually produced. Good for ~11k code size reduction in the compiler and 1% speedup in -fsyntax-only on the code in <rdar://problem/11004361>. llvm-svn: 156176
-
DeLesley Hutchins authored
llvm-svn: 156175
-
James Molloy authored
Fix handling of wint_t - we can't assume wint_t is purely an integer promotion of wchar_t - they may differ in signedness. Teach ASTContext about WIntType, and have it taken from TargetInfo like WCharType. Should fix test/Sema/format-strings.c for ARM, with the exception of one subtest which will fail if wint_t and wchar_t are the same size and wint_t is signed, wchar_t is unsigned. There'll be a followup commit to fix that. Reviewed by Chandler and Hans at http://llvm.org/reviews/r/8 llvm-svn: 156165
-
Richard Trieu authored
in the conditional. llvm-svn: 156148
-
Stephen Canon authored
llvm-svn: 156123
-
- May 03, 2012
-
-
Douglas Gregor authored
performing the search for overridden methods. We very rarely see the same container twice, and in those rare cases we still have the fallback of the second SmallPtrSet to eliminate duplicates. Good for ~1.5% -fsyntax-only speedup on the code in <rdar://problem/11004361>. llvm-svn: 156103
-
Bob Wilson authored
Some of the NSAssert macros in OS X 10.7 are implemented in a way that adds extra arguments that trigger the -Wformat-extra-args warning. Earlier versions of clang failed to detect those -Wformat issues, but now that clang is reporting those problems, we need to quiet them since there's nothing to be done to fix them. <rdar://problem/11317765> I don't know how to write a testcase for this. Suggestions welcome. Patch by Ted Kremenek! llvm-svn: 156092
-
Kaelyn Uhrain authored
llvm-svn: 156091
-
Richard Smith authored
cases in switch statements. Also add a [[clang::fallthrough]] attribute, which can be used to suppress the warning in the case of intentional fallthrough. Patch by Alexander Kornienko! The handling of C++11 attribute namespaces in this patch is temporary, and will be replaced with a cleaner mechanism in a subsequent patch. llvm-svn: 156086
-
Fariborz Jahanian authored
under -Wobjc-missing-property-synthesis which must be opted-in. // rdar://11295716 llvm-svn: 156078
-
Richard Trieu authored
#define TEST int y; int x = y; void foo() { TEST } -Wuninitialized gives this warning: invalid-loc.cc:4:3: warning: variable 'y' is uninitialized when used here [-Wuninitialized] TEST ^~~~ invalid-loc.cc:2:29: note: expanded from macro 'TEST' #define TEST int y; int x = y; ^ note: initialize the variable 'y' to silence this warning 1 warning generated. The second note lacks filename, line number, and code snippet. This change will remove the fixit and only point to variable declaration. invalid-loc.cc:4:3: warning: variable 'y' is uninitialized when used here [-Wuninitialized] TEST ^~~~ invalid-loc.cc:2:29: note: expanded from macro 'TEST' #define TEST int y; int x = y; ^ invalid-loc.cc:4:3: note: variable 'y' is declared here TEST ^ invalid-loc.cc:2:14: note: expanded from macro 'TEST' #define TEST int y; int x = y; ^ 1 warning generated. llvm-svn: 156045
-
Richard Smith authored
refactorings in that revision, and some of the subsequent bugfixes, which seem to be relevant even without delayed exception specification parsing. llvm-svn: 156031
-
DeLesley Hutchins authored
llvm-svn: 156030
-
- May 02, 2012
-
-
Rafael Espindola authored
them, otherwise we cannot produce an error for both struct HIDDEN test4; // canonical struct test4; struct DEFAULT test4; and struct test5; // canonical struct HIDDEN test5; struct DEFAULT test5; llvm-svn: 156016
-
DeLesley Hutchins authored
llvm-svn: 156005
-
Douglas Gregor authored
TableGen-generated StringMatcher, for a 1.2% speedup in -fparse-only time in <rdar://problem/11004361>. Thanks to Benjamin for pointing me at StringMatcher! llvm-svn: 156003
-
Douglas Gregor authored
we accept are not modeled somehow via Attr.td. llvm-svn: 155998
-
Douglas Gregor authored
as an AST node, and fold a number of such attributes into Attr.td. llvm-svn: 155995
-