summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove unused method declaration.Ted Kremenek2012-07-141-1/+0
| | | | llvm-svn: 160216
* Sort prototypes. No functionality change.Ted Kremenek2012-07-141-19/+18
| | | | llvm-svn: 160215
* Add a per target max vector alignment field (e.g., 32-byte alignment for x86 ↵Chad Rosier2012-07-133-0/+7
| | | | | | | | | | due to AVX). Currently, if no aligned attribute is specified the alignment of a vector is inferred from its size. Thus, very large vectors will be over-aligned with no benefit. Target owners should set this target max. llvm-svn: 160209
* PR13360: When deciding the earliest point which inevitably leads to anRichard Smith2012-07-131-14/+19
| | | | | | | uninitialized variable use, walk back over branches where we've reached all the non-null successors, not just cases where we've reached all successors. llvm-svn: 160206
* Move option test earlier in the function.Rafael Espindola2012-07-131-3/+2
| | | | llvm-svn: 160202
* This is one of the first steps at moving to replace target-dependent Joel Jones2012-07-131-1/+4
| | | | | | | | | | | | | | | | | | | | intrinsics with target-indepdent intrinsics. The first instruction(s) to be handled are the vector versions of count leading zeros (ctlz). The changes here are to clang so that it generates a target independent vector ctlz when it sees an ARM dependent vector ctlz. The changes in llvm are to match the target independent vector ctlz and in VMCore/AutoUpgrade.cpp to update any existing bc files containing ARM dependent vector ctlzs with target-independent ctlzs. There are also changes to an existing test case in llvm for ARM vector count instructions and a new test for the bitcode upgrade. <rdar://problem/11831778> There is deliberately no test for the change to clang, as so far as I know, no consensus has been reached regarding how to test neon instructions in clang; q.v. <rdar://problem/8762292> llvm-svn: 160201
* Modify tree printing mode for template type diffing. If a diagnostic hasRichard Trieu2012-07-131-2/+3
| | | | | | | multiple %diff's, only print the first tree and fallback to inline printing for the rest of the diagnostic. llvm-svn: 160193
* add support for conditional expressions in Expr::HasSideEffects()Nuno Lopes2012-07-131-0/+3
| | | | | | This fixes a bug in __builtin_object_size() codegen llvm-svn: 160191
* Comment AST nodes: rename getXXXCount() methods to getNumXXXs() to be in ↵Dmitri Gribenko2012-07-132-6/+6
| | | | | | line with Statement AST nodes. llvm-svn: 160182
* Apply visibility pragmas to class template declarations. This is needed becauseRafael Espindola2012-07-131-0/+2
| | | | | | we might use the declaration to build a type before seeing the definition. llvm-svn: 160176
* Use -fvisibility-inlines-hidden in inline functions too. This matches gccRafael Espindola2012-07-131-29/+42
| | | | | | behavior since gcc pr30066. Thanks to Benjamin Kramer for pointing it out. llvm-svn: 160174
* Move helper class into an anonymous namespace.Benjamin Kramer2012-07-131-0/+2
| | | | llvm-svn: 160172
* Allows retrieving all files in a CompilationDatabase.Manuel Klimek2012-07-131-0/+20
| | | | | | Patch by Tobias Koenig, some test changes by myself. llvm-svn: 160167
* Provide a special-case diagnostic when two class member functions instantiateRichard Smith2012-07-132-14/+27
| | | | | | | to the same signature. Fix a bug in the type printer which would cause this diagnostic to print wonderful types like 'const const int *'. llvm-svn: 160161
* Fix a bug in my previous commit. The problem is not that we were not using theRafael Espindola2012-07-132-4/+5
| | | | | | | canonical decl for the template, but that we were not merging attributes for templates at all! llvm-svn: 160157
* Attaching comments to declarations during parsing: handle more Objective-C ↵Dmitri Gribenko2012-07-134-3/+17
| | | | | | declarations. llvm-svn: 160156
* Comment parsing: repaint the bikesched: rename 'HTML open tags' to 'HTML ↵Dmitri Gribenko2012-07-134-110/+108
| | | | | | start tags' and 'HTML close tags' to 'HTML end tags' according to HTML spec. llvm-svn: 160153
* Make concepts of optional and forbidden end tags separate. Thanks Jordan ↵Dmitri Gribenko2012-07-121-7/+30
| | | | | | for pointing this! llvm-svn: 160149
* Use the canonical template decl when trying to find if it has a visibilityRafael Espindola2012-07-121-2/+4
| | | | | | attribute. llvm-svn: 160139
* [Windows] Use thiscall as the default calling convention for class methods. ↵Timur Iskhodzhanov2012-07-126-14/+33
| | | | | | PR12785 llvm-svn: 160121
* Add _rdrand{16,32,64}_step intrinsics to immintrin.hBenjamin Kramer2012-07-122-0/+43
| | | | llvm-svn: 160118
* PR13312: Don't crash when printing a fixit that ends in a unicode character.Benjamin Kramer2012-07-121-1/+6
| | | | llvm-svn: 160112
* Process #pragma visibility early in the parsing of class definitions. FixesRafael Espindola2012-07-121-4/+4
| | | | | | pr13338. llvm-svn: 160105
* Ignore visibility attributes after definitions. This matches newer (4.7) gcc'sRafael Espindola2012-07-121-0/+8
| | | | | | behavior and is the first step in fixing pr13338. llvm-svn: 160104
* Revert r160052, "Default to -std=c++11 on Windows.", for now.NAKAMURA Takumi2012-07-121-5/+2
| | | | | | | | | Failing Tests (3): Clang :: Index/complete-cxx-inline-methods.cpp Clang :: Index/recursive-cxx-member-calls.cpp Clang :: SemaTemplate/inject-templated-friend-post.cpp llvm-svn: 160103
* Add the ObjFW runtime. Patch by Jonathan Schleifer!John McCall2012-07-125-5/+39
| | | | llvm-svn: 160102
* AST/CommentSema.cpp: Fix signess in abs() to appease msvc. It would not make ↵NAKAMURA Takumi2012-07-121-1/+2
| | | | | | sense to pass (unsigned)-(unsigned) to abs(). llvm-svn: 160097
* clang/lib/Basic/CMakeLists.txt: Add missing dependency, ClangDiagnosticComment.NAKAMURA Takumi2012-07-121-0/+1
| | | | llvm-svn: 160096
* [analyzer] Don't inline virtual calls unless we can devirtualize properly.Jordan Rose2012-07-123-39/+100
| | | | | | | | 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
* Add OpenCL metadata for kernel arg names. This output is controlled via a ↵Tanya Lattner2012-07-112-0/+33
| | | | | | | | flag as noted in the OpenCL Spec. Includes a test case. llvm-svn: 160092
* Don't try to do RVO on block variables that refer to an enclosing local.Nico Weber2012-07-111-1/+1
| | | | | | | Fixes PR13314, clang crashing on blocks refering to an enclosing local when the enclosing function returns void. llvm-svn: 160089
* Stop instantiating a class if we hit a static_assert failure. Also, if theRichard Smith2012-07-116-21/+43
| | | | | | | static_assert fails when parsing the template, don't diagnose it again on every instantiation. llvm-svn: 160088
* Fix warning.Richard Smith2012-07-111-1/+1
| | | | llvm-svn: 160087
* Enable comment parsing and semantic analysis to emit diagnostics. A fewDmitri Gribenko2012-07-1113-103/+446
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Introduce a flag in SourceManager to treat non-system source filesArgyrios Kyrtzidis2012-07-114-19/+47
| | | | | | | | | | | | | | | | | | | | 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
* Allow -verify directives to be filtered by preprocessing.Jordan Rose2012-07-111-28/+90
| | | | | | | | | | | | | | | | | | | | | 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
* Add a hook to supply a custom CompilationDatabase. To add a custom ↵Daniel Jasper2012-07-112-0/+46
| | | | | | | | 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
* [driver] Fix so that clang can find correct path prefix for libc object filesChad Rosier2012-07-111-0/+5
| | | | | | | from GNU binutils supporting multi-arch folder for ARM target. Patch by Jiangning Liu <jiangning.liu@arm.com>. llvm-svn: 160060
* Handle #pragma visibility in explicit specializations and enums.Rafael Espindola2012-07-111-6/+4
| | | | llvm-svn: 160057
* Emit -verify diagnostics even when we have a fatal error.Jordan Rose2012-07-113-27/+35
| | | | | | | | | | | | | | 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
* Default to -std=c++11 on Windows.Nico Weber2012-07-111-2/+5
| | | | llvm-svn: 160052
* Fix handling of curly braces in NVPTX inline asmJustin Holewinski2012-07-111-0/+1
| | | | | | | | Fixes bug 13322 Patch by Dmitry Mikushin llvm-svn: 160050
* Temporarily revert this to see if it brings the gdb bot back.Eric Christopher2012-07-112-7/+6
| | | | llvm-svn: 160049
* LLVM_ON_WIN32 case: use the proper key in the UniqueFiles map.Axel Naumann2012-07-111-1/+7
| | | | llvm-svn: 160041
* Don't process #pragma visibility during instantiation. The visibility of theRafael Espindola2012-07-111-1/+2
| | | | | | | instantiation depends on the template, its arguments and parameters, but not where it is instantiated. llvm-svn: 160034
* The end of a block doesn't necessarily need a line table entry unlessEric Christopher2012-07-112-6/+7
| | | | | | | | | | 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
* [analyzer] Add debug.DumpCalls, which prints out any CallEvents it sees.Jordan Rose2012-07-103-2/+51
| | | | | | | | | | 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
* [analyzer] Guard against C++ member functions that look like system functions.Jordan Rose2012-07-105-43/+66
| | | | | | | | | 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
* Fix crash when constant-evaluating a CXXConstructExpr representingRichard Smith2012-07-101-8/+9
| | | | | | | value-initialization for an array of class type with a trivial default constructor. llvm-svn: 160024
* [analyzer] Construct stack variables directly in their VarDecl.Jordan Rose2012-07-104-39/+80
| | | | | | | | 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
OpenPOWER on IntegriCloud