- Jul 12, 2012
-
-
John McCall authored
llvm-svn: 160102
-
NAKAMURA Takumi authored
AST/CommentSema.cpp: Fix signess in abs() to appease msvc. It would not make sense to pass (unsigned)-(unsigned) to abs(). llvm-svn: 160097
-
NAKAMURA Takumi authored
llvm-svn: 160096
-
Jordan Rose authored
Previously we were using the static type of the base object to inline methods, whether virtual or non-virtual. Now, we try to see if the base object has a known type, and if so ask for its implementation of the method. llvm-svn: 160094
-
Tanya Lattner authored
Add OpenCL metadata for kernel arg names. This output is controlled via a flag as noted in the OpenCL Spec. Includes a test case. llvm-svn: 160092
-
Nico Weber authored
Fixes PR13314, clang crashing on blocks refering to an enclosing local when the enclosing function returns void. llvm-svn: 160089
-
Richard Smith authored
static_assert fails when parsing the template, don't diagnose it again on every instantiation. llvm-svn: 160088
-
Richard Smith authored
llvm-svn: 160087
-
- Jul 11, 2012
-
-
Dmitri Gribenko authored
diagnostics implemented -- see testcases. I created a new TableGen file for comment diagnostics, DiagnosticCommentKinds.td, because comment diagnostics don't logically fit into AST diagnostics file. But I don't feel strongly about it. This also implements support for self-closing HTML tags in comment lexer and parser (for example, <br />). In order to issue precise diagnostics CommentSema needs to know the declaration the comment is attached to. There is no easy way to find a decl by comment, so we match comments and decls in lockstep: after parsing one declgroup we check if we have any new, not yet attached comments. If we do -- then we do the usual comment-finding process. It is interesting that this automatically handles trailing comments. We pick up not only comments that precede the declaration, but also comments that *follow* the declaration -- thanks to the lookahead in the lexer: after parsing the declgroup we've consumed the semicolon and looked ahead through comments. Added -Wdocumentation-html flag for semantic HTML errors to allow the user to disable only HTML warnings (but not HTML parse errors, which we emit as warnings in -Wdocumentation). llvm-svn: 160078
-
Argyrios Kyrtzidis authored
as "volatile", meaning there's a high enough chance that they may change while we are trying to use them. This flag is only enabled by libclang. Currently "volatile" source files will be stat'ed immediately before opening them, because the file size stat info may not be accurate since when we got it (e.g. from the PCH). This avoids crashes when trying to reference mmap'ed memory from a file whose size is not what we expect. Note that there's still a window for a racing issue to occur but the window for it should be way smaller than before. We can consider later on to avoid mmap completely on such files. rdar://11612916 llvm-svn: 160074
-
Jordan Rose authored
This is accomplished by making VerifyDiagnosticsConsumer a CommentHandler, which then only reads the -verify directives that are actually in live blocks of code. It also makes it simpler to handle -verify directives that appear in header files, though we still have to manually reparse some files depending on how they are generated. This requires some test changes. In particular, all PCH tests now have their -verify directives outside the "header" portion of the file, using the @line syntax added in r159978. Other tests have been modified mostly to make it clear what is being tested, and to prevent polluting the expected output with the directives themselves. Patch by Andy Gibbs! (with slight modifications) The new Frontend/verify-* tests exercise the functionality of this commit, as well as r159978, r159979, and r160053 (Andy's other -verify enhancements). llvm-svn: 160068
-
Daniel Jasper authored
Add a hook to supply a custom CompilationDatabase. To add a custom CompilationDatabase, make it implement findCompilationDatabaseForDirectory in CustomCompilationDatabase.h and set USE_COSTUM_COMPILATION_DATABASE. Differential Revision: http://llvm-reviews.chandlerc.com/D4 llvm-svn: 160061
-
Chad Rosier authored
from GNU binutils supporting multi-arch folder for ARM target. Patch by Jiangning Liu <jiangning.liu@arm.com>. llvm-svn: 160060
-
Rafael Espindola authored
llvm-svn: 160057
-
Jordan Rose authored
Previously we'd halt at the fatal error as expected, but not actually emit any -verify-related diagnostics. This lets us catch cases that emit a /different/ fatal error from the one we expected. This is implemented by adding a "force emit" mode to DiagnosticBuilder, which will cause diagnostics to immediately be emitted regardless of current suppression. Needless to say this should probably be used /very/ sparingly. Patch by Andy Gibbs! Tests for all of Andy's -verify patches coming soon. llvm-svn: 160053
-
Nico Weber authored
llvm-svn: 160052
-
Justin Holewinski authored
Fixes bug 13322 Patch by Dmitry Mikushin llvm-svn: 160050
-
Eric Christopher authored
llvm-svn: 160049
-
Axel Naumann authored
llvm-svn: 160041
-
Rafael Espindola authored
instantiation depends on the template, its arguments and parameters, but not where it is instantiated. llvm-svn: 160034
-
Eric Christopher authored
there's something going on there. Remove the unconditional line entry and only add one if we're emitting cleanups (any other statements would be handled normally). Fixes rdar://9199234 llvm-svn: 160033
-
Jordan Rose authored
This is probably not so useful yet because it is not path-sensitive, though it does try to show inlining with indentation. This also adds a dump() method to CallEvent, which should be useful for debugging. llvm-svn: 160030
-
Jordan Rose authored
C++ method calls and C function calls both appear as CallExprs in the AST. This was causing crashes for an object that had a 'free' method. <rdar://problem/11822244> llvm-svn: 160029
-
Richard Smith authored
value-initialization for an array of class type with a trivial default constructor. llvm-svn: 160024
-
Jordan Rose authored
Also contains a number of tweaks to inlining that are necessary for constructors and destructors. (I have this enabled on a private branch, but it is very much unstable.) llvm-svn: 160023
-
Jordan Rose authored
In order to accomplish this, we now build the callee's stack frame as part of the CallEnter node, rather than the subsequent BlockEdge node. This should not have any effect on perceived behavior or diagnostics. This makes it safe to re-enable inlining of member overloaded operators. llvm-svn: 160022
-
Jordan Rose authored
These ProgramPoints are used in inlining calls, and not all calls have associated statements anymore. llvm-svn: 160021
-
Jordan Rose authored
While this work is still fairly tentative (destructors are still left out of the CFG by default), we now handle destructors in the same way as any other calls, instead of just automatically trying to inline them. llvm-svn: 160020
-
Jordan Rose authored
These are currently unused, but are intended to be used in lieu of PreStmt and PostStmt when the call is implicit (e.g. an automatic object destructor). This also modifies the Data1 field of ProgramPoints to allow storing any pointer-sized value, as opposed to only aligned pointers. This is necessary to store SourceLocations. There is currently no BugReporter support for these; they should be skipped over in any diagnostic output. This commit also tags checkers that currently rely on function calls only occurring at StmtPoints. llvm-svn: 160019
-
- Jul 10, 2012
-
-
DeLesley Hutchins authored
llvm-svn: 160018
-
Chad Rosier authored
llvm-svn: 160017
-
Daniel Jasper authored
Reviewers: klimek Differential Revision: http://ec2-50-18-127-156.us-west-1.compute.amazonaws.com/D2 llvm-svn: 160013
-
Arnaud A. de Grandmaison authored
Adds support for auto-detection of compilation databases, looking in a directory and all its parents. llvm-svn: 159998
-
Axel Naumann authored
Implement UniqueFileContainer::erase(), camelCase, add comment on future optimizations of the cache versus de-optimizations of invalidations. llvm-svn: 159997
-
Anna Zaks authored
PR13319 Reported by Jozsef Mihalicza. llvm-svn: 159996
-
Axel Naumann authored
The consumer might see multiple input files (e.g. for cling) and since r159977 the count is maintained across input files. llvm-svn: 159995
-
Manuel Klimek authored
from a source file and changes clang-check to make use of this. This makes clang-check just work on in-tree builds, and allows easy setup via a symlink per source directory to make clang-check work without any extra configuration. llvm-svn: 159990
-
Jordan Rose authored
void f(); // expected-note 0+ {{previous declaration is here}} void g(); // expected-note 0-1 {{previous declaration is here}} The old "+" syntax is still an alias for "1+", and single numbers still work. Patch by Andy Gibbs! llvm-svn: 159979
-
Jordan Rose authored
// expected-warning@10 {{some text}} The line number may be absolute (as above), or relative to the current line by prefixing the number with either '+' or '-'. Patch by Andy Gibbs! llvm-svn: 159978
-
Jordan Rose authored
Patch by Andy Gibbs! llvm-svn: 159977
-