- Jun 21, 2012
-
-
Chandler Carruth authored
express library-level dependencies within Clang. This is no more verbose really, and plays nicer with the rest of the CMake facilities. It should also have no change in functionality. llvm-svn: 158888
-
Richard Smith authored
is passed to a variadic function in a position where a format string indicates that c_str()'s return type is desired, provide a note suggesting that the user may have intended to call the c_str() member. Factor the non-POD-vararg checking out of DefaultVariadicArgumentPromotion and move it to SemaChecking in order to facilitate this. Factor the call checking out of function call checking and block call checking, and extend it to cover constructor calls too. Patch by Sam Panzer! llvm-svn: 158887
-
Chandler Carruth authored
llvm-svn: 158884
-
Richard Smith authored
is permitted by all relevant language standards. Patch by Andy Gibbs! llvm-svn: 158883
-
Dmitri Gribenko authored
RawCommentList::addComment: fix the assertion so it actually checks that new comment is after the last one (change Comments[0] to Comments.back()), and handle the case of two consecutive comments, e.g. /** *//* */. There is already a testcase for that (but it didn't trigger the assert because the assert itself was wrong). llvm-svn: 158882
-
Anna Zaks authored
llvm-svn: 158875
-
Fariborz Jahanian authored
// rdar://11671080 llvm-svn: 158874
-
Fariborz Jahanian authored
has not overridden the property. // rdar://11656982 llvm-svn: 158871
-
Fariborz Jahanian authored
"write" attribute (copy/retain/etc.). But, property declaration in primary class and protcols are tentative as they may be overridden into a 'readwrite' property in class extensions. Postpone diagnosing such warnings until the class implementation is seen. // rdar://11656982 llvm-svn: 158869
-
James Dennett authored
llvm-svn: 158861
-
- Jun 20, 2012
-
-
John McCall authored
places. I've turned this off for the GNU runtimes --- I don't know if they support weak class import, but it's easy enough for them to opt in. Also tweak a comment per review by Jordan. llvm-svn: 158860
-
James Dennett authored
* Escape < characters in Doxygen comments as needed; * Add \code...\endcode around code examples; * Remove an incorrect use of Doxygen's \arg command. llvm-svn: 158859
-
Alexander Kornienko authored
Added test with sizeof conditions (relies on to-be-implemented functionality of CFG, discussion: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120507/057370.html) llvm-svn: 158854
-
Jordan Rose authored
Now that this is a C-only warning, we can use "static" instead of "internal linkage", which is a term developers are probably more familiar with. This makes for a better warning message. The warning name was changed to match, since "internal linkage" is not mentioned in the warning text anymore. llvm-svn: 158853
-
James Dennett authored
* Many fixes for \brief summaries (adding some, and making others shorter); * Don't try to explicit tell Doxygen a namespace name (and particularly don't get it wrong); * Typo fix: instantitions -> instantiations; * Slightly more use of \pre for documenting preconditions. llvm-svn: 158852
-
Anna Zaks authored
Similar to r156661. This should be beneficial performance wise and hopefully, resolve a RecursiveASTVisitor crash that we are seeing in the wild, but are incapable of reproducing. llvm-svn: 158851
-
Anna Zaks authored
This commits sets the grounds for more aggressive use after free checking. We will use the Relinquished sate to denote that someone else is now responsible for releasing the memory. llvm-svn: 158850
-
Anna Zaks authored
llvm-svn: 158849
-
James Dennett authored
llvm-svn: 158847
-
Dmitri Gribenko authored
Remove unused ASTContext& arg in RawCommentList::addComment, as pointed out by Chandler in commit message for r158807. llvm-svn: 158845
-
Nico Weber authored
in microsoft mode. Fixes PR12701. The code for this was already in 2 of the 3 branches of a conditional and missing in the 3rd branch, so lift it above the conditional. llvm-svn: 158842
-
Chad Rosier authored
llvm-svn: 158837
-
Jordan Rose authored
It's very easy for anonymous external linkage to propagate in C++ through return types and parameter types. Likewise, it's possible that a template containing an inline function is only used with parameters that have internal linkage. Actually diagnosing where the internal linkage comes from is fairly difficult (both to locate and then to print nicely). Finally, since we only have one translation unit available, we can't even prove that any of this violates the ODR. This warning needs better-defined behavior in C++ before it can really go in. Rewording of the C warning (which /is/ specified by C99) coming shortly. llvm-svn: 158836
-
Chad Rosier authored
error was asserting on anything that included Windows.h. MS-style inline asm is still dropped, but at least now we're not completely silent about it. llvm-svn: 158833
-
Benjamin Kramer authored
CreateEnumType doesn't participate in caching so the descriptor for the enum gets recomputed for every reference of an element of an enum, only to get discarded when it gets turned into an MDNode. No functionality change except performance. llvm-svn: 158832
-
Chad Rosier authored
llvm-svn: 158830
-
Fariborz Jahanian authored
change in behavior. // rdar://11671080 llvm-svn: 158828
-
Alexis Hunt authored
Rose and Richard Smith for catching these. llvm-svn: 158826
-
Chandler Carruth authored
That commit added a new library just to hold the RawCommentList. I've started a discussion on the commit thread about whether that is really meritted -- it certainly doesn't seem necessary at this stage. However, the immediate problem is that the AST library has a hard dependency on the Comment library, but the dependencies were set up completely backward. In addition to the layering violation, this had an unfortunate effect if scattering the Comments library dependency throughout the build system, but inconsistently so -- several parts of the CMake dependencies were missing and only showed up due to transitive deps or the fact that the target wasn't being built by tho bots. It turns out that the Comments library can't (currently) be a well formed layer *below* the AST library either, as it has an API that accepts an ASTContext. That parameter is currently unused, so maybe that was a mistake? Anyways, it really seems like this is logically part of the AST -- that's the whole point of the ASTContext providing access to it as far as I can tell -- so I've merged it into the AST library to solve the immediate layering violation problems and remove some of the churn from our library dependencies. llvm-svn: 158807
-
Chandler Carruth authored
This issue was caught by the new '-Winternal-linkage-in-inline' warning. llvm-svn: 158801
-
Ted Kremenek authored
a bit further. We may wish to just have -Wno flags to silence warnings, and not have a -no-pedantic. llvm-svn: 158796
-
Chandler Carruth authored
../tools/clang/lib/Serialization/ASTReader.cpp:6316:9: warning: default label in switch which covers all enumeration values [-Wcovered-switch-default] Also fix the indentation here to match the coding conventions. llvm-svn: 158794
-
John McCall authored
target Objective-C runtime down to the frontend: break this down into a single target runtime kind and version, and compute all the relevant information from that. This makes it relatively painless to add support for new runtimes to the compiler. Make the new -cc1 flag, -fobjc-runtime=blah-x.y.z, available at the driver level as a better and more general alternative to -fgnu-runtime and -fnext-runtime. This new concept of an Objective-C runtime also encompasses what we were previously separating out as the "Objective-C ABI", so fragile vs. non-fragile runtimes are now really modelled as different kinds of runtime, paving the way for better overall differentiation. As a sort of special case, continue to accept the -cc1 flag -fobjc-runtime-has-weak, as a sop to PLCompatibilityWeak. I won't go so far as to say "no functionality change", even ignoring the new driver flag, but subtle changes in driver semantics are almost certainly not intended. llvm-svn: 158793
-
Jordan Rose authored
Per Anna's comment, this is a better way to handle "to-do list"-type failures. This way we'll know if any of the features get fixed; in an XFAIL file, /all/ the cases have to be fixed before lit would tell us anything. llvm-svn: 158791
-
Argyrios Kyrtzidis authored
-Disable -pedantic-errors when migrating per Jordan's suggestion. -Use llvm_move() per John's suggestion. llvm-svn: 158785
-
Jordan Rose authored
The default global placement new just returns the pointer it is given. Note that other custom 'new' implementations with placement args are not guaranteed to do this. In addition, we need to invalidate placement args, since they may be updated by the allocator function. (Also, right now we don't properly handle the constructor inside a CXXNewExpr, so we need to invalidate the placement args just so that callers know something changed!) This invalidation is not perfect because CallOrObjCMessage doesn't support CXXNewExpr, and all of our invalidation callbacks expect that if there's no CallOrObjCMessage, the invalidation is happening manually (e.g. by a direct assignment) and shouldn't affect checker-specific metadata (like malloc state); hence the malloc test case in new-fail.cpp. But region values are now properly invalidated, at least. The long-term solution to this problem is to rework CallOrObjCMessage into something more general, rather than the morass of branches it is today. <rdar://problem/11679031> llvm-svn: 158784
-
Argyrios Kyrtzidis authored
[NSNumber numberWithDouble:cppb]; warning: converting to boxing syntax requires a cast to something like: [NSNumber numberWithDouble:cppb]; warning: converting to boxing syntax requires casting 'bool' to 'double' This is way better to fully understand the warning. rdar://11705106 llvm-svn: 158783
-
Rafael Espindola authored
llvm-svn: 158782
-
Argyrios Kyrtzidis authored
for "hard" ARC errors, not warnings. rdar://11691437 llvm-svn: 158781
-
Dmitri Gribenko authored
Unbreak GCC build: GCC doesn't like clang::Parser::CommentHandler and class clang::CommentHandler to have same name. llvm-svn: 158780
-