- Jun 16, 2011
-
-
Fariborz Jahanian authored
declaration of global var is __private_extern__. // rdar://9609649 llvm-svn: 133157
-
NAKAMURA Takumi authored
AFAIK, RHEL5 (and its clones) provides g++44 as the package "gcc44-c++". By default, g++-4.1.1 is available, though, its libstdc++ would not be suitable to clang++. llvm-svn: 133156
-
Chandler Carruth authored
and the programmer intended to write 'sizeof(*p)'. There are several elements to the new version: 1) The actual expressions are compared in order to more accurately flag the case where the pattern that works for an array has been used, or a '*' has been omitted. 2) Only do a loose type-based check for record types. This prevents us from warning when we happen to be copying around chunks of data the size of a pointer and the pointer types for the sizeof and source/dest match. 3) Move all the diagnostics behind the runtime diagnostic filter. Not sure this is really important for this particular diagnostic, but almost everything else in SemaChecking.cpp does so. 4) Make the wording of the diagnostic more precise and informative. At least to my eyes. 5) Provide highlighting for the two expressions which had the unexpected similarity. 6) Place this diagnostic under a flag: -Wsizeof-pointer-memaccess This uses the Stmt::Profile system for computing #1. Because of the potential cost, this is guarded by the warning flag. I'd be interested in feedback on how bad this is in practice; I would expect it to be quite cheap in practice. Ideas for a cheaper / better way to do this are also welcome. The diagnostic wording could likely use some further wordsmithing. Suggestions welcome here. The goals I had were to: clarify that its the interaction of 'memset' and 'sizeof' and give more reasonable suggestions for a resolution. An open question is whether these diagnostics should have the note attached for silencing by casting the dest/source pointer to void*. llvm-svn: 133155
-
Jordy Rose authored
[analyzer] Clean up modeling of strcmp, including cases where a string literal has an embedded null character, and where both arguments are the same buffer. Also use nested ifs rather than early returns; in this case early returns will lose any assumptions we've made earlier in the function. llvm-svn: 133154
-
Chandler Carruth authored
a ConstStmtVisitor. This also required adding some const iteration support for designated initializers and making some of the getters on the designators const. It also made the formatting of StmtProfile.cpp rather awkward. I'm happy to adjust any of the formatting if folks have suggestions. I've at least fitted it all within 80 columns. llvm-svn: 133152
-
Jordy Rose authored
I will not commit without building first. I will not commit without building first. I will not commit without building first... llvm-svn: 133150
-
Jordy Rose authored
[analyzer] Cleanup: mainly 80-char violations and preferring SValBuilder::getComparisonType() to just referencing IntTy. llvm-svn: 133149
-
John McCall authored
llvm-svn: 133148
-
John McCall authored
llvm-svn: 133147
-
John McCall authored
before it on the link line. llvm-svn: 133145
-
John McCall authored
llvm-svn: 133144
-
Chandler Carruth authored
pattern found in the wild where this warning was firing. llvm-svn: 133143
-
Argyrios Kyrtzidis authored
llvm-svn: 133140
-
Chandler Carruth authored
llvm-svn: 133138
-
Chandler Carruth authored
c-index-test and friends. This brings the failures on CMake clang tests from 23 to 2 on Linux. llvm-svn: 133137
-
Chandler Carruth authored
argument types for mem{set,cpy,move}. Character pointers, much like void pointers, often point to generic "memory", so trying to check whether they match the type of the argument to 'sizeof' (or other checks) is unproductive and often results in false positives. Nico, please review; does this miss any of the bugs you were trying to find with this warning? The array test case you had should be caught by the array-specific sizeof warning I think. llvm-svn: 133136
-
Andrew Trick authored
llvm-svn: 133130
-
John McCall authored
linking unnecessarily into libclang. llvm-svn: 133129
-
John McCall authored
llvm-svn: 133125
-
John McCall authored
complaining about mismatches in the global method pool. llvm-svn: 133123
-
Chandler Carruth authored
be more consistent in how parenthesized ranges which hit macros are handled. Also makes the code significantly shorter, and the diagnostics when macros are present a bit more useful. Pair programmed w/ Matthew. llvm-svn: 133122
-
Chandler Carruth authored
pretty. In particular this makes it much easier for me to read messages such as: x.cc:42: ?: has lower ... Where I'm inclined to associate the third ':' with a missing column number, but in fact column numbers have been turned off. Similar punctuation collisions happened elsewhere as well. llvm-svn: 133121
-
Chandler Carruth authored
llvm-svn: 133120
-
Argyrios Kyrtzidis authored
[arcmt] Make arcmt-test accept cc1 options to make it more portable and hopefully fix MSVC failures. llvm-svn: 133119
-
John McCall authored
llvm-svn: 133116
-
John McCall authored
on all platforms in non-ARC mode. llvm-svn: 133114
-
John McCall authored
them only on Darwin tool chains. llvm-svn: 133112
-
John McCall authored
llvm-svn: 133110
-
John McCall authored
llvm-svn: 133109
-
John McCall authored
for this. llvm-svn: 133104
-
John McCall authored
Language-design credit goes to a lot of people, but I particularly want to single out Blaine Garst and Patrick Beard for their contributions. Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself, in no particular order. llvm-svn: 133103
-
John McCall authored
include a specific variable. llvm-svn: 133102
-
John McCall authored
llvm-svn: 133096
-
Eli Friedman authored
llvm-svn: 133095
-
- Jun 15, 2011
-
-
John McCall authored
Depends on LLVM r133093. llvm-svn: 133094
-
John McCall authored
feature. Implementation to follow. :) llvm-svn: 133090
-
Chris Lattner authored
llvm-svn: 133087
-
Eli Friedman authored
llvm-svn: 133079
-
Eli Friedman authored
llvm-svn: 133073
-
Eli Friedman authored
Use isAnyComplexType here so we don't pass complex numbers into the aggregate handling code; found by inspection. llvm-svn: 133070
-