summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* ReadSourceManagerBlock is skipping over records that can contain Blobs. Not ↵Chris Lattner2013-01-211-1/+2
| | | | | | | | | passing in a StringRef to bind to them forces them to be unpacked into the Record as individual bytes. This is wasteful, but not likely to be measurable in this instance. llvm-svn: 173066
* Revert r173056; it breaks one of the CodeGen-with-PCH tests.Douglas Gregor2013-01-211-18/+8
| | | | llvm-svn: 173058
* When loading an identifier from an AST file solely for the purpose ofDouglas Gregor2013-01-211-8/+18
| | | | | | | | | | forming the identifier, e.g., as part of a selector or a declaration name, don't actually deserialize any information about the identifier. Instead, simply mark it "out-of-date" and we'll load the the information on demand. 2% speedup on the modules testcase I'm looking at; should also help PCH. llvm-svn: 173056
* Fixes formatting of empty blocks.Manuel Klimek2013-01-212-41/+40
| | | | | | | | | | | | | | | | We now only put empty blocks into a single line, if all of: - all tokens of the structural element fit into a single line - we're not in a control flow statement Note that we usually don't put record definitions into a single line, as there's usually at least one more token (the semicolon) after the closing brace. This doesn't hold when we are in a context where there is no semicolon, like "enum E {}". There were some missing tests around joining lines around the corner cases of the allowed number of columns, so this patch adds some. llvm-svn: 173055
* When deserializing a declaration, don't look for redeclarations if itsDouglas Gregor2013-01-214-15/+81
| | | | | | | kind indicates that it can never be redeclared. Good for a 1% speedup, and redeclaration searching drops off the profile. llvm-svn: 173054
* Introduce a fast path for the ASTReader's name lookup within aDouglas Gregor2013-01-214-2/+103
| | | | | | | | | DeclContext. When the DeclContext is of a kind that can only be defined once and never updated, we limit the search to the module file that conatins the lookup table. Provides a 15% speedup in one modules-heavy source file. llvm-svn: 173050
* Fix parsing of templated declarations.Daniel Jasper2013-01-211-1/+0
| | | | | | | | | | Before: template <template <typename T>, typename P > class X; After: template <template <typename T>, typename P> class X; More importantly, the token annotations for the second ">" are now computed correctly. llvm-svn: 173047
* Fixes indent in linkage specification blocks.Manuel Klimek2013-01-211-0/+12
| | | | | | | | | | | We now indent: extern "C" { int a; } without additional indent inside the extern "C" block. llvm-svn: 173045
* Fix bug discovered by valgrind.Daniel Jasper2013-01-211-2/+3
| | | | | | | When trying to merge lines, we should not touch lines that are invalid, as we don't know how long they might be. llvm-svn: 173043
* Fixes detection of class template specializations.Manuel Klimek2013-01-211-1/+14
| | | | | | | Now correctly formats: template <> class A<int> {} a; llvm-svn: 173038
* First step towards vftable generation with -cxx-abi microsoft PR13231Timur Iskhodzhanov2013-01-212-30/+87
| | | | llvm-svn: 173035
* Add a fixit for _Noreturn main,Dmitri Gribenko2013-01-211-2/+8
| | | | | | add tests for fixits removing static and inline from main llvm-svn: 173024
* CGDebugInfo.cpp: Fix a warning. [-Wunused-variable]NAKAMURA Takumi2013-01-211-0/+1
| | | | llvm-svn: 173022
* Allow for nested name specifiers in record declarations.Manuel Klimek2013-01-211-1/+3
| | | | | | | Now correctly formats: class A::B {} n; llvm-svn: 173019
* Fix parsing of return statements.Manuel Klimek2013-01-212-0/+30
| | | | | | | | | Previously, we would not detect brace initializer lists in return statements, thus: return (a)(b) { 1, 2, 3 }; would put the semicolon onto the next line. llvm-svn: 173017
* Port r172856: 'Include ubsan runtime even when building a shared library. We ↵Alexey Samsonov2013-01-212-7/+4
| | | | | | don't require executable to be linked with UBSan.' to Mac llvm-svn: 173014
* PR14472: Preserve qualifiers while unwrapping types for debug infoDavid Blaikie2013-01-211-14/+9
| | | | | | | | | | Looks like r161368 fixed this for one case but not all. This change generalizes the solution over all the unwrapping cases. Now that preserving the qualifiers is done independent of the particular type being unwrapped I won't bother adding test cases for each one but at least demonstrate that this change was necessary & sufficient to fix the bug. llvm-svn: 173002
* Add top-level Clang flag -f(no-)sanitize-address-zero-base-shadow that makes ↵Alexey Samsonov2013-01-204-11/+38
| | | | | | AddressSanitizer use bottom of the address space for the shadow memory. On Linux it can be used with -fPIE/-pie to improve performance. llvm-svn: 172974
* Implement OpenCL event_t as Clang builtin type, including event_t related ↵Guy Benyei2013-01-2030-8/+146
| | | | | | OpenCL restrictions (OpenCL 1.2 spec 6.9) llvm-svn: 172973
* update to use the new BitcodeCursor readRecord that takes a StringRef blob ↵Chris Lattner2013-01-203-137/+93
| | | | | | | | parameter, and adopt "advance" in more places. llvm-svn: 172951
* Nuke SetUpBuildDumpLog.Sean Silva2013-01-205-47/+9
| | | | | | | Also, it was the only reason that `argc` and `argv` were being passed into createDiagnostics, so remove those parameters and clean up callers. llvm-svn: 172945
* Fix what appears to be a copy-paste error.Sean Silva2013-01-201-1/+1
| | | | | | | | | | This looks like it was copied from SetUpBuildDumpLog, which dumps to the file `DiagOpts->DumpBuildInformation`. There is another member `DiagOpts->DiagnosticLogFile` which appears to be unused. The fact that this feature doesn't even print to the output file specified on the command line makes me think that it should be ripped out. llvm-svn: 172944
* The last of PR14471: Debug info support for inline in-class initializer for ↵David Blaikie2013-01-201-4/+8
| | | | | | float static members llvm-svn: 172942
* Fixed trailing whitespace.Michael Gottesman2013-01-201-44/+44
| | | | llvm-svn: 172939
* add back a #include needed on some builders.Chris Lattner2013-01-201-0/+1
| | | | llvm-svn: 172938
* finish converting the normal cases in ASTReader to use the new ↵Chris Lattner2013-01-201-202/+147
| | | | | | BitstreamCursor APIs. llvm-svn: 172937
* convert some more stuff over to use new cursor APIs.Chris Lattner2013-01-201-37/+34
| | | | llvm-svn: 172932
* Use llvm::hexDigitValue in comment lexerDmitri Gribenko2013-01-191-6/+2
| | | | llvm-svn: 172924
* switch a bunch of ASTReader to use the new BitstreamCursor::advance* methods,Chris Lattner2013-01-191-162/+145
| | | | | | | which hide a bunch of private details of the cursor from clients and simplify their code. More to come. llvm-svn: 172922
* [analyzer] Don't show "Entered 'foo'" if 'foo' is implicit.Jordan Rose2013-01-191-0/+5
| | | | | | | | | | | | | | | | Before: Calling implicit default constructor for 'Foo' (where Foo is constructed) Entered call from 'test' (at "=default" or 'Foo' declaration) Calling default constructor for 'Bar' (at "=default" or 'Foo' declaration) After: Calling implicit default constructor for 'Foo' (where Foo is constructed) Calling default constructor for 'Bar' (at "=default" or 'Foo' declaration) This only affects the plist diagnostics; this note is never shown in the other diagnostics. llvm-svn: 172915
* Emit the function type of member function pointer types the same as member ↵David Blaikie2013-01-191-2/+9
| | | | | | | | | | | | functions. Adding the pseudo first parameter to a member function pointer's function type and mark it as artificial. Combined with a fix to GDB ( http://sourceware.org/bugzilla/show_bug.cgi?id=14998 ) this fixes gdb.cp/member-ptr.exp with Clang. llvm-svn: 172911
* libclangSerialization also depends on the bitreader.Benjamin Kramer2013-01-191-0/+2
| | | | llvm-svn: 172910
* Re-sort all the headers. Lots of regressions have crept in here.Chandler Carruth2013-01-194-4/+3
| | | | | | | | | | Manually fix the order of UnwrappedLineParser.cpp as that one didn't have its associated header as the first header. This also uncovered a subtle inclusion order dependency as CLog.h didn't include LLVM.h to pick up using declarations it relied upon. llvm-svn: 172892
* Reapply r172878 with test case.Ted Kremenek2013-01-191-3/+9
| | | | llvm-svn: 172888
* Fix five more cases of tokens which can legally follow a type specifier.Richard Smith2013-01-191-2/+13
| | | | llvm-svn: 172886
* [PCH/Modules] Revert r172843, it caused a module to fail building.Argyrios Kyrtzidis2013-01-193-46/+53
| | | | llvm-svn: 172884
* [analyzer] Suppress warnings coming out of macros defined in sys/queue.hAnna Zaks2013-01-191-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | Suppress the warning by just not emitting the report. The sink node would get generated, which is fine since we did reach a bad state. Motivation Due to the way code is structured in some of these macros, we do not reason correctly about it and report false positives. Specifically, the following loop reports a use-after-free. Because of the way the code is structured inside of the macro, the analyzer assumes that the list can have cycles, so you end up with use-after-free in the loop, that is safely deleting elements of the list. (The user does not have a way to teach the analyzer about shape of data structures.) SLIST_FOREACH_SAFE(item, &ctx->example_list, example_le, tmpitem) { if (item->index == 3) { // if you remove each time, no complaints assert((&ctx->example_list)->slh_first == item); SLIST_REMOVE(&ctx->example_list, item, example_s, example_le); free(item); } } llvm-svn: 172883
* Whitespace.NAKAMURA Takumi2013-01-191-1/+1
| | | | llvm-svn: 172881
* Revert r172878, "Reword warning about using a *static* variable within its ↵NAKAMURA Takumi2013-01-191-10/+4
| | | | | | | | own initialization." It broke, at least, linux, msvc and mingw bots. llvm-svn: 172879
* Reword warning about using a *static* variable within its own initialization.Ted Kremenek2013-01-191-4/+10
| | | | | | | | | The warning is still under -Wuninitialized (although technically this is defined behavior), but under a subgroup -Wstatic-self-init. This addresses PR 10265. llvm-svn: 172878
* -Wuninitialized: warn about uninitialized values resulting from ?: that ↵Ted Kremenek2013-01-191-0/+10
| | | | | | evaluate to lvalues (in C++). llvm-svn: 172875
* Remove windows line endings.David Blaikie2013-01-181-6/+6
| | | | llvm-svn: 172865
* Remove unused variableMatt Beaumont-Gay2013-01-181-1/+0
| | | | llvm-svn: 172862
* Adopt llvm::hexDigitValue.Jordan Rose2013-01-181-13/+4
| | | | llvm-svn: 172861
* Once we've collected the template arguments for aDouglas Gregor2013-01-181-3/+7
| | | | | | | | partially-substituted parameter pack in a template, forget about the partially-substituted parameter pack: it is now completed. Fixes <rdar://problem/12176336>. llvm-svn: 172859
* Thread-safety analysis: ignore edges from throw expressions in CFG.DeLesley Hutchins2013-01-181-2/+16
| | | | llvm-svn: 172858
* Include ubsan runtime even when building a shared library. We don't require ↵Richard Smith2013-01-181-11/+9
| | | | | | the executable to be linked with UBSan. llvm-svn: 172856
* [mips] Enable inlining of atomic ops on mips32 and mips64.Akira Hatanaka2013-01-181-0/+2
| | | | llvm-svn: 172855
* Use the AttributeSet query method instead of the Attribute method.Bill Wendling2013-01-181-1/+1
| | | | llvm-svn: 172849
* [PCH/Modules] Re-apply r172620 and r172629, now with 100% less infinite loops!Argyrios Kyrtzidis2013-01-183-53/+47
| | | | | | | | | Makes sure that a deserialized macro is only added to the preprocessor macro definitions only once. Unfortunately I couldn't get a reduced test case. rdar://13016031 llvm-svn: 172843
OpenPOWER on IntegriCloud