- Jun 16, 2011
-
-
Fariborz Jahanian authored
getLVForNamespaceScopeDecl(). // rdar://9609649 llvm-svn: 133182
-
Evan Cheng authored
llvm-svn: 133181
-
Douglas Gregor authored
constants. Fixes PR10145. llvm-svn: 133179
-
Douglas Gregor authored
__builtin_ versions of these functions as well as the normal function versions, so that it works on platforms where memset/memcpy/memmove are macros that map down to the builtins (e.g., Darwin). Fixes <rdar://problem/9372688>. llvm-svn: 133173
-
Fariborz Jahanian authored
null at any time. // rdar://9612030 llvm-svn: 133168
-
Argyrios Kyrtzidis authored
llvm-svn: 133167
-
John McCall authored
llvm-svn: 133165
-
Douglas Gregor authored
checks that the deduced argument type for a function call matches the actual argument type provided. The only place we've found where the consistency checking should actually cause template argument deduction failure is due to qualifier differences that don't fall into the realm of qualification conversions (which are *not* checked when we initially perform deduction). However, we're performing the full checking as specified in the standard to ensure that no other cases exist. Fixes PR9233 / <rdar://problem/9039590>. llvm-svn: 133163
-
Chandler Carruth authored
These are somewhat special in that they wrap any other FrontendAction, running various ARC transformations or checks prior to the standard action's run. To implement them easily, this extends FrontendAction to have a WrapperFrontendAction utility class which forwards all calls by default to an inner action setup at construction time. This is then subclassed to override the specific behavior needed by the different ARCMT tools. Finally, FrontendTool is taught how to create these wrapper actions from the existing flags and options structures. The result is that clangFrontend no longer depends on clangARCMigrate. This is very important, as clangARCMigrate *heavily* depends on clangFrontend. Fundamentally ARCMigrate is at the same layer as a library like Rewrite, sitting firmly on top of the Frontend, but tied together with the FrontendTool when building the clang binary itself. llvm-svn: 133161
-
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
-