- Sep 06, 2012
-
-
Jordan Rose authored
...and hopefully unbreak buildbots. My apologies! llvm-svn: 163267
-
- Aug 20, 2012
-
-
Chad Rosier authored
llvm-svn: 162210
-
- Jul 17, 2012
-
-
Richard Smith authored
* Treat compound assignment as a use, at Jordy's request. * Always add compound assignments into the CFG, so we can correctly diagnose the use in 'return x += 1;' llvm-svn: 160334
-
- Jul 03, 2012
-
-
DeLesley Hutchins authored
llvm-svn: 159607
-
- Jun 15, 2012
-
-
Alexis Hunt authored
llvm-svn: 158545
-
- Jun 11, 2012
-
-
Chad Rosier authored
llvm-svn: 158325
-
- Jun 02, 2012
-
-
Alexander Kornienko authored
Implementation of a "soft opt-in" option for -Wimplicit-fallthrough diagnostics: -Wimplicit-fallthrough-per-method llvm-svn: 157871
-
- May 26, 2012
-
-
Richard Smith authored
-Wsometimes-uninitialized diagnostics to make it clearer that the cause of the issue may be a condition which must always evaluate to true or false, rather than an uninitialized variable. To emphasize this, add a new note with a fixit which removes the impossible condition or replaces it with a constant. Also, downgrade the diagnostic from -Wsometimes-uninitialized to -Wconditional-uninitialized when it applies to a range-based for loop, since the condition is not written explicitly in the code in that case. llvm-svn: 157511
-
Alexander Kornienko authored
switch label immediately followed by a 'break;'. llvm-svn: 157508
-
- May 25, 2012
-
-
Richard Smith authored
-Wsometimes-uninitialized. This detects cases where an explicitly-written branch inevitably leads to an uninitialized variable use (so either the branch is dead code or there is an uninitialized use bug). This chunk of warnings tentatively lives within -Wuninitialized, in order to give it more visibility to existing Clang users. llvm-svn: 157458
-
Richard Smith authored
llvm-svn: 157440
-
- May 09, 2012
-
-
Richard Trieu authored
-Wconditional-uninitialized into -Wuninitialized. llvm-svn: 156512
-
- May 03, 2012
-
-
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
-
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
-
- Apr 30, 2012
-
-
David Blaikie authored
Reviewed by Doug Gregor. llvm-svn: 155839
-
- Apr 28, 2012
-
-
Jordy Rose authored
[analyzer] Remove references to idx::TranslationUnit. Index is dead, cross-TU inlining never panned out. llvm-svn: 155751
-
- Mar 26, 2012
-
-
Benjamin Kramer authored
std::list is expensive, but so is std::sorting a SmallVector of SmallVectors of heavyweight PartialDiagnostics. Saves ~30k in a i386-linux-Release+Asserts clang build. llvm-svn: 153437
-
- Mar 08, 2012
-
-
Fariborz Jahanian authored
an uninitialized block variable is being called inside the block literal. // rdar://10817031 llvm-svn: 152271
-
- Feb 15, 2012
-
-
Douglas Gregor authored
function, provide a specialized diagnostic that indicates the kind of special member function (default constructor, copy assignment operator, etc.) and that it was implicitly deleted. Add a hook where we can provide more detailed information later. llvm-svn: 150611
-
Douglas Gregor authored
llvm-svn: 150586
-
- Feb 07, 2012
-
-
Benjamin Kramer authored
Revert my patches which removed Diagnostic.h includes by moving some operator overloads out of line. This seems to negatively affect compile time onsome ObjC tests (which use a lot of partial diagnostics I assume). I have to come up with a way to keep them inline without including Diagnostic.h everywhere. Now adding a new diagnostic requires a full rebuild of e.g. the static analyzer which doesn't even use those diagnostics. This reverts commit 6496bd10dc3a6d5e3266348f08b6e35f8184bc99. This reverts commit 7af19b817ba964ac560b50c1ed6183235f699789. This reverts commit fdd15602a42bbe26185978ef1e17019f6d969aa7. This reverts commit 00bd44d5677783527d7517c1ffe45e4d75a0f56f. This reverts commit ef9b60ffed980864a8db26ad30344be429e58ff5. llvm-svn: 150006
-
- Feb 04, 2012
-
-
Benjamin Kramer authored
Fix all the files that depended on transitive includes of Diagnostic.h. With this patch in place changing a diagnostic no longer requires a full rebuild of the StaticAnalyzer. llvm-svn: 149781
-
- Feb 03, 2012
-
-
Richard Smith authored
* When we detect that a CFG block has inconsistent lock sets, point the diagnostic at the location where we found the inconsistency, and point a note at somewhere the inconsistently-locked mutex was locked. * Fix the wording of the normal (non-loop, non-end-of-function) case of this diagnostic to not suggest that the mutex is going out of scope. * Fix the diagnostic emission code to keep a warning and its note together when sorting the diagnostics into source location order. llvm-svn: 149669
-
- Jan 24, 2012
-
-
David Blaikie authored
r148774, r148775, r148776, r148777 llvm-svn: 148780
-
David Blaikie authored
llvm-svn: 148774
-
- Jan 21, 2012
-
-
Eli Friedman authored
Make clang's AST model sizeof and typeof with potentially-evaluated operands correctly, similar to what we already do with typeid. llvm-svn: 148610
-
- Jan 13, 2012
-
-
Richard Smith authored
- If the declarator is at the start of a line, and the previous line contained another declarator and ended with a comma, then that comma was probably a typo for a semicolon: int n = 0, m = 1, l = 2, // k = 5; myImportantFunctionCall(); // oops! - If removing the parentheses would correctly initialize the object, then produce a note suggesting that fix. - Otherwise, if there is a simple initializer we can suggest which performs value-initialization, then provide a note suggesting a correction to that initializer. Sema::Declarator now tracks the location of the comma prior to the declarator in the declaration, if there is one, to facilitate providing the note. The code to determine an appropriate initializer from the -Wuninitialized warning has been factored out to allow use in both that and -Wvexing-parse. llvm-svn: 148072
-
- Dec 20, 2011
-
-
- Dec 08, 2011
-
-
DeLesley Hutchins authored
llvm-svn: 146174
-
- Dec 01, 2011
-
-
Ted Kremenek authored
explicit template specializations (which represent actual functions somebody wrote). Along the way, refactor some other code which similarly cares about whether or not they are looking at a template instantiation. llvm-svn: 145547
-
- Nov 30, 2011
-
-
Ted Kremenek authored
Don't run -Wunreachable-code on template instantiations. Different instantiations may produce different unreachable code results, and it is very difficult for us to prove that ALL instantiations of a template have specific unreachable code. If we come up with a better solution, then we can revisit this, but this approach will at least greatly reduce the noise of this warning for code that makes use of templates. llvm-svn: 145520
-
- Oct 24, 2011
-
-
Ted Kremenek authored
Rename AnalysisContext to AnalysisDeclContext. Not only is this name more accurate, but it frees up the name AnalysisContext for other uses. llvm-svn: 142782
-
- Oct 23, 2011
-
-
Ted Kremenek authored
[analyzer] Remove LocationContext creation methods from AnalysisManager, and change clients to use AnalysisContext instead. WIP to remove/reduce ExprEngine's usage of AnalysisManager. llvm-svn: 142739
-
- Oct 21, 2011
-
-
DeLesley Hutchins authored
llvm-svn: 142666
-
- Oct 19, 2011
-
-
Matt Beaumont-Gay authored
llvm-svn: 142538
-
- Oct 13, 2011
-
-
Ted Kremenek authored
Tweak -Wuninitialized's handling of 'int x = x' to report that as the root cause of an uninitialized variable IFF there are other uses of that uninitialized variable. Fixes <rdar://problem/9259237>. llvm-svn: 141881
-
- Oct 10, 2011
-
-
Douglas Gregor authored
it might be wrong for other instantiations of the same function template. Fixes PR10801. llvm-svn: 141559
-
- Sep 26, 2011
-
-
David Blaikie authored
llvm-svn: 140478
-
- Sep 15, 2011
-
-
Caitlin Sadowski authored
Thread safety: refactoring various out of scope warnings to use the same inteface. This eliminates a lot of unnecessary duplicated code. llvm-svn: 139801
-