summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Make this test determinstic for my last patch.Fariborz Jahanian2013-02-141-18/+18
| | | | | | // rdar://13192366 llvm-svn: 175217
* objective-C: synthesize properties in order of theirFariborz Jahanian2013-02-144-16/+29
| | | | | | | | declarations to synthesize their ivars in similar determinstic order so they are laid out in a determinstic order. // rdar://13192366 llvm-svn: 175214
* libclang: remove reinterpret_casts by using SourceLocation::getFromPtrEncodingDmitri Gribenko2013-02-141-24/+12
| | | | | | directly instead of casting a pointer to an integer llvm-svn: 175206
* objective-C: When implementing custom accessor method forFariborz Jahanian2013-02-145-3/+60
| | | | | | | | a property, the -Wdirect-ivar-access should not warn when accessing the property's synthesized instance variable. // rdar://13142820 llvm-svn: 175195
* [analyzer] Try constant-evaluation for all variables, not just globals.Jordan Rose2013-02-142-21/+61
| | | | | | | | | | | | | | | | | | | | | In C++, constants captured by lambdas (and blocks) are not actually stored in the closure object, since they can be expanded at compile time. In this case, they will have no binding when we go to look them up. Previously, RegionStore thought they were uninitialized stack variables; now, it checks to see if they are a constant we know how to evaluate, using the same logic as r175026. This particular code path is only for scalar variables. Constant arrays and structs are still unfortunately unhandled; we'll need a stronger solution for those. This may have a small performance impact, but only for truly-undefined local variables, captures in a non-inlined block, and non-constant globals. Even then, in the non-constant case we're only doing a quick type check. <rdar://problem/13105553> llvm-svn: 175194
* [arcmt] Make sure the function has an associated parameter for the argumentArgyrios Kyrtzidis2013-02-142-1/+10
| | | | | | | | before checking for its attributes. rdar://13192395 llvm-svn: 175184
* Mangle extern "C" functions whose names are not simple identifiers.Rafael Espindola2013-02-142-2/+13
| | | | llvm-svn: 175166
* Fix counting of parameters so that r175162 works as expected.Daniel Jasper2013-02-143-9/+16
| | | | | | | | | | | | | | | Before: aaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa() .aaaaaaaaaaaaaaaaa()); After: aaaaaaaaaaaaaaaaaaaaaaaaa( aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa().aaaaaaaaaaaaaaaaa()); Not sure which of the formattings above is better, but we should not pick one by accident. llvm-svn: 175165
* Reduce penalty for breaking before ./-> after complex calls.Daniel Jasper2013-02-143-16/+21
| | | | | | | | | | | | | | | | | This gives a clearer separation of the context, e.g. in GMOCK statements. Before: EXPECT_CALL(SomeObject, SomeFunction(Parameter)).WillRepeatedly(Return(SomeValue)); After: EXPECT_CALL(SomeObject, SomeFunction(Parameter)) .WillRepeatedly(Return(SomeValue)); Minor format cleanups. llvm-svn: 175162
* Remove a const_cast by propagating constness to called functionsDmitri Gribenko2013-02-142-3/+3
| | | | llvm-svn: 175161
* Remove an unneeded const_castDmitri Gribenko2013-02-141-3/+2
| | | | llvm-svn: 175160
* Remove const_casts by making spec_begin()/spec_end() constDmitri Gribenko2013-02-143-19/+18
| | | | llvm-svn: 175159
* Remove the trailing whitespace of formatted lines.Daniel Jasper2013-02-142-13/+25
| | | | | | | | | | | | | | | So far, clang-format has always assumed the whitespace belonging to the subsequent token. This has the negative side-effect that when clang-format formats a line, it does not remove its trailing whitespace, as it belongs to the next token. Thus, this patch fixes most of llvm.org/PR15062. We are not zapping a file's trailing whitespace so far, as this does not belong to any token we see during formatting. We need to fix this in a subsequent patch. llvm-svn: 175152
* Get less confused by trailing comma in Google style.Daniel Jasper2013-02-142-1/+13
| | | | | | | | | | | | | | | | | The formatter can now format: void aaaaaaaaaaaaaaaaaa(int level, double *min_x, double *max_x, double *min_y, double *max_y, double *min_z, double *max_z, ) { } Although this is invalid code, it frequently happens during development and clang-format should be nicer :-). llvm-svn: 175151
* Remove accidentally committed empty test.Daniel Jasper2013-02-141-3/+0
| | | | llvm-svn: 175148
* Align superclasses for multiple inheritence.Daniel Jasper2013-02-144-2/+36
| | | | | | | | | | | | | | | | This fixes llvm.org/PR15179. Before: class ColorChooserMac : public content::ColorChooser, public content::WebContentsObserver { }; After: class ColorChooserMac : public content::ColorChooser, public content::WebContentsObserver { }; llvm-svn: 175147
* Revert accidental commit.Bill Wendling2013-02-141-13/+0
| | | | llvm-svn: 175143
* Pass the target options through to code generation.Bill Wendling2013-02-146-10/+33
| | | | | | | The code generation stuff is going to set attributes on the functions it generates. To do that it needs the target options. Pass them through. llvm-svn: 175141
* Partially revert r175117 so that we don't break assumptions about howRafael Espindola2013-02-144-9/+24
| | | | | | | static functions in extern "C" contexts are mangled. Should fix the bootstrap. llvm-svn: 175132
* merge hasCLanguageLinkage and isExternC. Keep the shorter name.Rafael Espindola2013-02-146-75/+60
| | | | | | | | | | I added hasCLanguageLinkage while fixing some language linkage bugs some time ago so that I wouldn't have to check all users of isExternC. It turned out to be a much longer detour than expected, but this patch finally merges the two again. The isExternC function now implements just the standard notion of having C language linkage. llvm-svn: 175119
* Add a getLanguageLinkage method to VarDecls and FunctionDecls. Use it to fixRafael Espindola2013-02-1410-40/+145
| | | | | | | | | | | | | | | some cases where functions with no language linkage were being treated as having C language linkage. In particular, don't warn in extern "C" { static NonPod foo(); } Since getLanguageLinkage checks the language linkage, the linkage computation cannot use the language linkage. Break the loop by checking just the context in the linkage computation. llvm-svn: 175117
* When marking derived classes' virtual methods ODR-used in order to triggerNick Lewycky2013-02-142-1/+18
| | | | | | | instantiation in order to permit devirtualization later in codegen, skip over pure functions since those can't be devirtualization targets. llvm-svn: 175116
* Teach ccc-analyze to pass on -iquote with no spaces between it an the argument.Ted Kremenek2013-02-141-0/+5
| | | | llvm-svn: 175115
* Actually fix rendering of the example code block!Richard Smith2013-02-141-1/+1
| | | | llvm-svn: 175113
* Some grammar fixes to 'Format String Checking', and reorder the text ↵Richard Smith2013-02-141-5/+6
| | | | | | slightly to try to make the final code block actually get rendered. llvm-svn: 175112
* Document Clang's support for [[gnu::...]] attributes.Richard Smith2013-02-141-2/+24
| | | | llvm-svn: 175110
* [docs] The stat cache has been removed from the PCH, update the docs to ↵Argyrios Kyrtzidis2013-02-142-17/+3
| | | | | | remove mentions of it. llvm-svn: 175109
* objective-C: Make order of ivars which are synthesizedFariborz Jahanian2013-02-132-7/+98
| | | | | | | | in the course of property synthesis deterministic (ordered by their type size), instead of having hashtable order (as it is currently). // rdar://13192366 llvm-svn: 175100
* Remove outdated performance.html webpage.Tanya Lattner2013-02-134-337/+0
| | | | llvm-svn: 175090
* [ms-inline asm] Add test case for r175083.Chad Rosier2013-02-131-0/+12
| | | | llvm-svn: 175084
* ubsan: Add checking for invalid downcasts. Per [expr.static.cast]p2 and p11,Richard Smith2013-02-135-5/+88
| | | | | | | base-to-derived casts have undefined behavior if the object is not actually an instance of the derived type. llvm-svn: 175078
* Allow breaking after the return type in function declarations.Daniel Jasper2013-02-134-8/+20
| | | | | | | | | | | | | | | | | This has so far been disabled for Google style, but should be done before breaking at nested name specifiers or in template parameters. Before (in Google style): template <typename T> aaaaaaaa::aaaaa::aaaaaa<T, aaaaaaaaaaaaaaaaaaaaaaaaa> aaaaaaaaaaaaaaaaaaaaaaaa< T>::aaaaaaa() {} After: template <typename T> aaaaaaaa::aaaaa::aaaaaa<T, aaaaaaaaaaaaaaaaaaaaaaaaa> aaaaaaaaaaaaaaaaaaaaaaaa<T>::aaaaaaa() {} llvm-svn: 175074
* Use 'RC_XBS' instead of 'RC_BUILDIT' to catch all times when it's built in ↵Bill Wendling2013-02-131-1/+1
| | | | | | the Apple way. llvm-svn: 175070
* Fix comment alignment close to the column limit.Daniel Jasper2013-02-132-1/+4
| | | | | | | Due to an error in one of the expressions, we used to not align comments although it would have been possible. llvm-svn: 175068
* [libclang] Fix annotation of a range where the begin or end locationArgyrios Kyrtzidis2013-02-132-9/+87
| | | | | | | | | is inside a macro argument. Previously we would give up and not annotate anything in the range. rdar://11891550 llvm-svn: 175062
* ... and now fix the +Asserts buildTimur Iskhodzhanov2013-02-131-2/+2
| | | | llvm-svn: 175054
* Fix the microsoft-abi-structors test expectations to match both Release and ↵Timur Iskhodzhanov2013-02-131-8/+14
| | | | | | Release+Asserts builds llvm-svn: 175053
* Pull search state out as class members.Manuel Klimek2013-02-131-17/+13
| | | | | | Fix some comments. llvm-svn: 175052
* An attempt to make the search algorithm easier to understand.Manuel Klimek2013-02-131-49/+86
| | | | | | | | | | | | | | | | | | | | - clear ownership: the SpecificBumpPtrAllocator owns all StateNodes - this allows us to simplify the memoization data structure into a std::set (FIXME: figure out whether we want to use a hash based data structure). - introduces StateNode as recursive data structure, instead of using Edge and the Seen-map combined to drill through the graph - using a count to stabilize the penalty instead of relying on the container - pulled out a method to forward-apply states in the end This leads to a ~40% runtime decrease on Nico's benchmark. Main FiXME is that the parameter lists of some function get too long. I'd vote for either pulling the Queue etc into the Formatter proper, or creating an inner class just for the search algorithm. llvm-svn: 175051
* Emit virtual/deleting destructors properly with -cxx-abi microsoft, PR15058Timur Iskhodzhanov2013-02-1310-57/+256
| | | | llvm-svn: 175045
* Formatter: And more cast tests (these don't pass yet).Nico Weber2013-02-131-0/+2
| | | | llvm-svn: 175031
* Formatter: Add more cast tests.Nico Weber2013-02-131-1/+9
| | | | llvm-svn: 175030
* Formatter: Refactor the cast detection code to be a bit more readable.Nico Weber2013-02-132-9/+11
| | | | | | No functionality change. Also add another cast test. llvm-svn: 175029
* Formatter: Detect ObjC method expressions after casts.Nico Weber2013-02-132-2/+3
| | | | | | Not all casts are correctly detected yet, but it helps in some cases. llvm-svn: 175028
* Change this comment to helpfully explain why it's there.Nick Lewycky2013-02-131-1/+2
| | | | llvm-svn: 175027
* [analyzer] Use Clang's evaluation for global constants and default arguments.Jordan Rose2013-02-135-22/+91
| | | | | | | | | | | Previously, we were handling only simple integer constants for globals and the smattering of implicitly-valued expressions handled by Environment for default arguments. Now, we can use any integer constant expression that Clang can evaluate, in addition to everything we handled before. PR15094 / <rdar://problem/12830437> llvm-svn: 175026
* [analyzer] Use makeZeroVal in RegionStore's lazy evaluation of statics.Jordan Rose2013-02-131-23/+19
| | | | | | No functionality change. llvm-svn: 175025
* [ms-inline-asm] Test cases to ensure the AsmRewrite list is sorted (r175021).Chad Rosier2013-02-131-0/+12
| | | | | | Part of rdar://13202662 llvm-svn: 175022
* Order the methods in the global method pool based on when they become ↵Douglas Gregor2013-02-124-9/+62
| | | | | | visible, not when they become deserialized <rdar://problem/13203033>. llvm-svn: 175018
* Replace 'signed' with 'int'. 'signed' is not typical for LLVM styleDmitri Gribenko2013-02-121-1/+1
| | | | llvm-svn: 175015
OpenPOWER on IntegriCloud