summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* libclangSerialization also depends on the bitreader.Benjamin Kramer2013-01-191-0/+2
| | | | llvm-svn: 172910
* update header comment.Chris Lattner2013-01-191-12/+12
| | | | llvm-svn: 172909
* fix the unit tests too.Chris Lattner2013-01-199-5/+9
| | | | llvm-svn: 172907
* these now depend on the bitcode reader too.Chris Lattner2013-01-196-3/+6
| | | | llvm-svn: 172906
* this depends on the bitcode reader, since it is using it.Chris Lattner2013-01-192-1/+2
| | | | llvm-svn: 172905
* [cindex.py] Add cache for CompletionChunk spellingsTobias Grosser2013-01-191-0/+29
| | | | | | | | | | | | | Most of the CompletionChunks represent braces, colons or other one character spellings. There is no need to call libclang, to figure out how to write a colon. Instead we use an internal cache to retrieve the correct spelling. As function calls from python are very expensive and this is a performance critical part of auto completion this patch makes formatting of auto completion results a lot faster. Formatting time changes from 0.57 to 0.45 seconds llvm-svn: 172901
* [cindex.py] Replace CachedProperty with our own implementationTobias Grosser2013-01-191-3/+9
| | | | | | | | | | | | This is a very performance critical point for auto completion. The manual implementation gives a large speedup. As it does not complicate the code a lot, I figured it is worth the change. If anybody understands why the CachedProperty is here so much slower, I am very interested in working on an improvement of CachedProperty. Formatting time changes from 0.72 to 0.57 seconds. llvm-svn: 172900
* [cindex.py]: Speed up lookup of the completion kindTobias Grosser2013-01-191-7/+11
| | | | | | | | | We can directly the number of the kind instead of going through the completionChunkKindMap. Formatting time changes from 0.84 to 0.72 seconds. llvm-svn: 172899
* Re-sort all the headers. Lots of regressions have crept in here.Chandler Carruth2013-01-1911-13/+13
| | | | | | | | | | 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
* Move an input header file under an Inputs directory to be consistentChandler Carruth2013-01-192-1/+1
| | | | | | | with other auxilliary test inputs and simplify the identification of inputs to tests. llvm-svn: 172890
* Reapply r172878 with test case.Ted Kremenek2013-01-194-20/+31
| | | | llvm-svn: 172888
* Fix five more cases of tokens which can legally follow a type specifier.Richard Smith2013-01-193-3/+51
| | | | llvm-svn: 172886
* [PCH/Modules] Revert r172843, it caused a module to fail building.Argyrios Kyrtzidis2013-01-196-61/+62
| | | | llvm-svn: 172884
* [analyzer] Suppress warnings coming out of macros defined in sys/queue.hAnna Zaks2013-01-194-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | 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-193-16/+5
| | | | | | | | 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-193-5/+16
| | | | | | | | | 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-192-4/+14
| | | | | | 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
* Fix mismatched #endif.Jordan Rose2013-01-181-1/+2
| | | | llvm-svn: 172860
* Once we've collected the template arguments for aDouglas Gregor2013-01-183-4/+38
| | | | | | | | 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-182-3/+37
| | | | llvm-svn: 172858
* Include ubsan runtime even when building a shared library. We don't require ↵Richard Smith2013-01-182-11/+19
| | | | | | the executable to be linked with UBSan. llvm-svn: 172856
* [mips] Enable inlining of atomic ops on mips32 and mips64.Akira Hatanaka2013-01-183-35/+51
| | | | 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-186-62/+62
| | | | | | | | | 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
* Fix parsing of class specifiers before '\n' 'operator'.Nico Weber2013-01-182-0/+19
| | | | | | | | | | | | | r159549 / r159164 regressed clang to reject struct s {}; struct s operator++(struct s a) { return a; } This fixes the regression. Richard, pleas check if this looks right. llvm-svn: 172834
* [analyzer] Special path notes for C++ special member functions.Jordan Rose2013-01-182-16/+1807
| | | | | | | | | | | | Examples: Calling implicit default constructor for Foo Calling defaulted move constructor for Foo Calling copy constructor for Foo Calling implicit destructor for Foo Calling defaulted move assignment operator for Foo Calling copy assignment operator for Foo llvm-svn: 172833
* [analyzer] Do a better job describing C++ member functions in the call stack.Jordan Rose2013-01-182-21/+911
| | | | | | | | Examples: Calling constructor for 'Foo' Entered call from 'Foo::create' llvm-svn: 172832
* Fix comment.Manuel Klimek2013-01-181-2/+1
| | | | llvm-svn: 172831
* Fixes issues around pulling in the next line in simple if statements.Manuel Klimek2013-01-182-12/+19
| | | | llvm-svn: 172822
* clang/test/CodeGen: Suppress a couple of tests on win32. It seems ↵NAKAMURA Takumi2013-01-182-0/+6
| | | | | | -fsanitize-blacklist doesn't accept DOSish pathnames. llvm-svn: 172820
* Fixes problems with line merging in the face of preprocessor directives.Manuel Klimek2013-01-183-7/+58
| | | | | | | | | | | | | | | This patch prepares being able to test for and fix more problems (see FIXME in the test for example). Previously we would output unwrapped lines for preprocessor directives at the point where we also parsed the hash token. Since often projections only terminate (and thus output their own unwrapped line) after peeking at the next token, this would lead to the formatter seeing the preprocessor directives out-of-order (slightly earlier). To be able to correctly identify lines to merge, the formatter needs a well-defined order of unwrapped lines, which this patch introduces. llvm-svn: 172819
* clang-check: Introduce llvm::sys::PrintStackTraceOnErrorSignal()NAKAMURA Takumi2013-01-181-0/+2
| | | | llvm-svn: 172818
* [ubsan] Add support for -fsanitize-blacklistWill Dietz2013-01-1819-68/+133
| | | | llvm-svn: 172808
* Reduce penalty for splitting between ")" and ".".Daniel Jasper2013-01-183-13/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | ').' is likely part of a builder pattern statement. This is based upon a patch developed by Nico Weber. Thank you! Before: int foo() { return llvm::StringSwitch<Reference::Kind>(name).StartsWith( ".eh_frame_hdr", ORDER_EH_FRAMEHDR).StartsWith( ".eh_frame", ORDER_EH_FRAME).StartsWith(".init", ORDER_INIT).StartsWith( ".fini", ORDER_FINI).StartsWith(".hash", ORDER_HASH).Default(ORDER_TEXT); } After: int foo() { return llvm::StringSwitch<Reference::Kind>(name) .StartsWith(".eh_frame_hdr", ORDER_EH_FRAMEHDR) .StartsWith(".eh_frame", ORDER_EH_FRAME) .StartsWith(".init", ORDER_INIT).StartsWith(".fini", ORDER_FINI) .StartsWith(".hash", ORDER_HASH).Default(ORDER_TEXT); } Probably not ideal, but makes many cases much more readable. The changes to overriding-ftemplate-comments.cpp don't seem better or worse. We should address those soon. llvm-svn: 172804
* Also align trailing line comments in include directives.Daniel Jasper2013-01-182-9/+16
| | | | | | | | | | | Before: #include <a> // for x #include <a/b/c> // for yz After: #include <a> // for x #include <a/b/c> // for yz llvm-svn: 172799
* Let the formatter align trailing line comments where possible.Daniel Jasper2013-01-182-54/+158
| | | | | | | | | | | | Before: int a; // comment int bbbbb; // comment After: int a; // comment int bbbbb; // comment llvm-svn: 172798
* Formatter: After case blocks, "break" goes on the same line as the "}", PR14907.Nico Weber2013-01-183-2/+30
| | | | | | | | | | | | | | | | | | | | | Before: switch (foo) { case a: { int a = g(); h(a); } break; } Now: switch (foo) { case a: { int a = g(); h(a); } break; } llvm-svn: 172789
* Formatter: Enable @encode test.Nico Weber2013-01-181-1/+3
| | | | | | | This doesn't work right with pointers to pointers, but that's likely just a dupe of PR14884. llvm-svn: 172785
* Revert Clang r172620 and r172629, which caused a hang when buildingDouglas Gregor2013-01-187-78/+74
| | | | | | | complicated modules (<rdar://problem/13038265>). Unfortunately, this un-fixes <rdar://problem/13016031>. llvm-svn: 172783
* Formatter: The contents of @selector() should be formatted as a selector.Nico Weber2013-01-182-13/+46
| | | | | | Before: @selector(foo: ) Now: @selector(foo:) llvm-svn: 172781
* When checking the parameter types of an Objective-C method, don'tDouglas Gregor2013-01-182-3/+5
| | | | | | | decay the parameter type immediately; let CheckParameter() do its job. Fixes <rdar://problem/12071218>. llvm-svn: 172780
* [ms-inline asm] Test case for r172773.Chad Rosier2013-01-181-0/+12
| | | | llvm-svn: 172774
* One can override an Objective-C ARC ownership qualifier that came fromDouglas Gregor2013-01-172-0/+18
| | | | | | | a template parameter; make that also include one that came from 'auto'. Fixes <rdar://problem/12078752>. llvm-svn: 172770
* Some builtins do not evaluate their arguments. Teach EvaluatedExprVisitor notRichard Smith2013-01-176-5/+32
| | | | | | to visit them. llvm-svn: 172769
* In Objective-C ARC, completely ignore ownership qualifiers on theDouglas Gregor2013-01-175-2/+87
| | | | | | | | return type of a function by canonicalizing them away. They are useless anyway, and conflict with our rules for template argument deduction and __strong. Fixes <rdar://problem/12367446>. llvm-svn: 172768
* [analyzer] DirectIvarAssignment: allow suppression annotation on Ivars.Anna Zaks2013-01-172-8/+21
| | | | llvm-svn: 172766
OpenPOWER on IntegriCloud