- Aug 23, 2011
-
-
Matt Beaumont-Gay authored
For the test case added to function-redecl.cpp, we were previously complaining about a mismatch in the parameter types, since the definition used the typedef'd type. llvm-svn: 138318
-
- Aug 22, 2011
-
-
Fariborz Jahanian authored
objc's decl context. llvm-svn: 138267
-
Ted Kremenek authored
Do not perform check for missing '[super dealloc]' under ARC as calling -dealloc is illegal in that mode. llvm-svn: 138261
-
Fariborz Jahanian authored
llvm-svn: 138253
-
Nico Weber authored
This matches gcc's logic. Half of PR10661. llvm-svn: 138240
-
Fariborz Jahanian authored
failures are resolved. llvm-svn: 138234
-
- Aug 19, 2011
-
-
Matt Beaumont-Gay authored
llvm-svn: 138074
-
Fariborz Jahanian authored
specified. // rdar://9971982 llvm-svn: 138062
-
Fariborz Jahanian authored
llvm-svn: 138049
-
Fariborz Jahanian authored
to modernity. Instead of passing down individual context objects from parser to sema, establish decl context in parser and have sema access current context as needed. I still need to take of Doug's comment for minor cleanups. llvm-svn: 138040
-
Benjamin Kramer authored
llvm-svn: 138032
-
Chandler Carruth authored
llvm-svn: 138024
-
Chandler Carruth authored
llvm-svn: 138023
-
Ted Kremenek authored
Enhance -Wstrl-incorrect-size to not report a FIXIT for destinations that are flexible arrays or have size 1. llvm-svn: 138004
-
- Aug 18, 2011
-
-
Kaelyn Uhrain authored
uncorrected identifier. Fixes a problem pointed out by Eli. llvm-svn: 137987
-
Ted Kremenek authored
Reapply r137903, but fix the definition of size_t in the test case to use __SIZE_TYPE__ (and hence be portable). Also, change the warning to -Wstrl-incorrect-size. llvm-svn: 137980
-
Argyrios Kyrtzidis authored
llvm-svn: 137973
-
Kaelyn Uhrain authored
diagnosing invalid function redeclarations. llvm-svn: 137966
-
Chandler Carruth authored
implicitly instantiable, even if we don't see a body on the friend function declaration. The body may simply have not yet been attached. This fixes PR10666. There may be an alternate, preferred implementation strategy, see my FIXME. Review would definitely be appreciated Doug. =D llvm-svn: 137934
-
Ted Kremenek authored
Revert r137903, "Add experimental -Wstrlcpy-size warning that looks to see if the size argument for strlcpy/strlcat is the size of the *source*, and not the size of the *destination*. This warning is off by default (for now)." This currently doesn't work on Windows. llvm-svn: 137920
-
Chandler Carruth authored
entirely use the existing -Wunused-value infrastructure. This also fixes a few missed cases for -Wunused in general. llvm-svn: 137916
-
Francois Pichet authored
Downgrade "err_init_list_variable_narrowing" into a warning in Microsoft mode even if c++0x is enabled. This necessary to parse MSVC code in C++0x mode. llvm-svn: 137904
-
Ted Kremenek authored
Add experimental -Wstrlcpy-size warning that looks to see if the size argument for strlcpy/strlcat is the size of the *source*, and not the size of the *destination*. This warning is off by default (for now). Warning logic provided by Geoff Keating. llvm-svn: 137903
-
John McCall authored
block returns; no functionality change. llvm-svn: 137884
-
- Aug 17, 2011
-
-
John McCall authored
Thanks to Ted for finding this with magic tools. llvm-svn: 137877
-
Argyrios Kyrtzidis authored
This results in libclang ignoring such methods. llvm-svn: 137852
-
Chandler Carruth authored
-Wunused was a mistake. It resulted in duplicate warnings and lots of other hacks. Instead, this should be a special sub-category to -Wunused-value, much like -Wunused-result is. Moved to -Wunused-comparison, moved the implementation to piggy back on the -Wunused-value implementation instead of rolling its own, different mechanism for catching all of the "interesting" statements. I like the unused-value mechanism for this better, but its currently missing several top-level statements. For now, I've FIXME-ed out those test cases. I'll enhance the generic infrastructure to catch these statements in a subsequent patch. This patch also removes the cast-to-void fixit hint. This hint isn't available on any of the other -Wunused-value diagnostics, and if we want it to be, we should add it generically rather than in one specific case. llvm-svn: 137822
-
Chandler Carruth authored
code is very likely to be buggy, but its going to require more significant changes on the part of the user to correct it in this case. llvm-svn: 137820
-
Chandler Carruth authored
a complement to the warnings we provide in condition expressions. Much like we warn on conditions such as: int x, y; ... if (x = y) ... // Almost always a typo of '==' This warning applies the complementary logic to "top-level" statements, or statements whose value is not consumed or used in some way: int x, y; ... x == y; // Almost always a type for '=' We also mirror the '!=' vs. '|=' logic. The warning is designed to fire even for overloaded operators for two reasons: 1) Especially in the presence of widespread templates that assume operator== and operator!= perform the expected comparison operations, it seems unreasonable to suppress warnings on the offchance that a user has written a class that abuses these operators, embedding side-effects or other magic within them. 2) There is a trivial source modification to silence the warning for truly exceptional cases: (void)(x == y); // No warning A (greatly reduced) form of this warning has already caught a number of bugs in our codebase, so there is precedent for it actually firing. That said, its currently off by default, but enabled under -Wall. There are several fixmes left here that I'm working on in follow-up patches, including de-duplicating warnings from -Wunused, sharing code with -Wunused's implementation (and creating a nice place to hook diagnostics on "top-level" statements), and handling cases where a proxy object with a bool conversion is returned, hiding the operation in the cleanup AST nodes. Suggestions for any of this code more than welcome. Also, I'd really love suggestions for better naming than "top-level". llvm-svn: 137819
-
Chandler Carruth authored
llvm-svn: 137780
-
- Aug 15, 2011
-
-
Richard Smith authored
llvm-svn: 137653
-
Matt Beaumont-Gay authored
llvm-svn: 137620
-
Douglas Gregor authored
conversion to initialize the standard conversion *after* the user-defined conversion properly. Fixes PR10644. llvm-svn: 137608
-
- Aug 14, 2011
-
-
Francois Pichet authored
Implement function template specialization at class scope extension in Microsoft mode. A new AST node is introduced: ClassScopeFunctionSpecialization. This node holds a FunctionDecl that is not yet specialized; then during the class template instantiation the ClassScopeFunctionSpecialization will spawn the actual function specialization. Example: template <class T> class A { public: template <class U> void f(U p) { } template <> void f(int p) { } // <== class scope specialization }; This extension is necessary to parse MSVC standard C++ headers, MFC and ATL code. BTW, with this feature in, clang can parse (-fsyntax-only) all the MSVC 2010 standard header files without any error. llvm-svn: 137573
-
- Aug 12, 2011
-
-
Jeffrey Yasskin authored
the C++0x narrowing error. llvm-svn: 137512
-
Richard Smith authored
llvm-svn: 137491
-
Douglas Gregor authored
done and is likely to not work well anyway; take away this unnecessary complexity. llvm-svn: 137465
-
Douglas Gregor authored
in the AST format, which are built lazily by the ASTContext when requested. llvm-svn: 137437
-
Douglas Gregor authored
AST file format, lazily generating the actual declaration in ASTContext as needed. llvm-svn: 137434
-
Douglas Gregor authored
AST file format, lazily generating the actual declaration in ASTContext as needed. llvm-svn: 137431
-