summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* fix save-oChris Lattner2008-11-191-1/+1
| | | | llvm-svn: 59611
* simplifyChris Lattner2008-11-191-1/+1
| | | | llvm-svn: 59610
* stop calling II::getName() unnecesarily in semaChris Lattner2008-11-1910-167/+146
| | | | llvm-svn: 59609
* simplify some code.Chris Lattner2008-11-191-8/+7
| | | | llvm-svn: 59608
* remove uses of IdentifierInfo::getName()Chris Lattner2008-11-192-6/+4
| | | | llvm-svn: 59607
* remove some uses of IdentifierInfo::getName()Chris Lattner2008-11-191-9/+8
| | | | llvm-svn: 59606
* add a new helper method. It is unclear to me why this doesn't work, but GCCChris Lattner2008-11-191-0/+6
| | | | | | | | | | | won't match it: template<std::size_t StrLen> bool isName(const char Str[StrLen]) const { return getLength() == StrLen-1 && !memcmp(getName(), Str, StrLen-1); } llvm-svn: 59605
* Use smallstring instead of new[]'ing a string. This simplifiesChris Lattner2008-11-191-8/+4
| | | | | | the code and speeds it up. llvm-svn: 59604
* remove uses of IdentifierInfo::getName()Chris Lattner2008-11-193-8/+11
| | | | llvm-svn: 59603
* don't turn identifierinfo's into strings in diagnostics.Chris Lattner2008-11-192-3/+3
| | | | llvm-svn: 59602
* Allow sending IdentifierInfo*'s into Diagnostics without turning them into ↵Chris Lattner2008-11-194-7/+35
| | | | | | | | strings first. This should allow removal of a bunch of II->getName() calls. llvm-svn: 59601
* convert some diags to use numbers instead of strings.Chris Lattner2008-11-192-8/+2
| | | | llvm-svn: 59600
* formattingChris Lattner2008-11-191-4/+2
| | | | llvm-svn: 59599
* add direct support for signed and unsigned integer arguments to diagnostics.Chris Lattner2008-11-194-2/+55
| | | | llvm-svn: 59598
* switch TextDiagnosticPrinter to raw_ostream.Chris Lattner2008-11-193-11/+18
| | | | llvm-svn: 59597
* rewrite FormatDiagnostic to be less gross and a lot more efficient.Chris Lattner2008-11-196-34/+67
| | | | | | | This also makes it illegal to have bare '%'s in diagnostics. If you want a % in a diagnostic, use %%. llvm-svn: 59596
* Discard unused runtime function declarations (for readability).Daniel Dunbar2008-11-191-0/+6
| | | | llvm-svn: 59594
* implement a transparent optimization with the diagnostics stuff:Chris Lattner2008-11-193-13/+71
| | | | | | | | | | const char*'s are now not converted to std::strings when the diagnostic is formed, we just hold onto their pointer and format as needed. This commit makes DiagnosticClient::FormatDiagnostic even more of a mess, I'll fix it in the next commit. llvm-svn: 59593
* Updated checker build.Ted Kremenek2008-11-191-1/+1
| | | | llvm-svn: 59591
* Address Sebastian and Doug's objections with taking pointers to temporaries.Chris Lattner2008-11-191-3/+3
| | | | | | Instead of doing that, copy the strings into the diagnostic info. llvm-svn: 59590
* remove one more old-style Diag method.Chris Lattner2008-11-1911-145/+134
| | | | llvm-svn: 59589
* Switch several more Sema Diag methods over. This simplifies theChris Lattner2008-11-1912-536/+432
| | | | | | | | __builtin_prefetch code to only emit one diagnostic per builtin_prefetch. While this has nothing to do with the rest of the patch, the code seemed like overkill when I was updating it. llvm-svn: 59588
* Built-in equality and relational operators have return type "bool" in C++,Douglas Gregor2008-11-194-26/+101
| | | | | | | | | | | | | | | | not "int". Fix a typo in the promotion of enumeration types that was causing some integral promotions to look like integral conversions (leading to extra ambiguities in overload resolution). Check for "acceptable" overloaded operators based on the types of the arguments. This is a somewhat odd check that is specified by the standard, but I can't see why it actually matters: the overload candidates it suppresses don't seem like they would ever be picked as the best candidates. llvm-svn: 59583
* Revert 59574 (caused tests to fail).Ted Kremenek2008-11-193-24/+16
| | | | llvm-svn: 59579
* scan-build now recognizes when the user is directly invoking gcc for:Ted Kremenek2008-11-191-2/+9
| | | | | | | (a) different versions of gcc (e.g., a suffix '-4.2') (b) different paths for gcc llvm-svn: 59578
* Generate strong write barriers for __strong objects.Fariborz Jahanian2008-11-195-16/+76
| | | | | | Also, took care of Daniel's commments. llvm-svn: 59575
* - Move static function IsNonPragmaNonMacroLexer into Preprocessor.h.Ted Kremenek2008-11-193-16/+24
| | | | | | | | | | | - Add variants of IsNonPragmaNonMacroLexer to accept an IncludeMacroStack entry (simplifies some uses). - Use IsNonPragmaNonMacroLexer in Preprocessor::LookupFile. Performance testing of -Eonly on Cocoa.h shows no performance regression because of this patch. llvm-svn: 59574
* Initialize CurPPLexer in Preprocessor's constructor.Ted Kremenek2008-11-191-1/+1
| | | | llvm-svn: 59573
* Fix warning about RegionStoreManager::Retrieve() not always returning a value.Ted Kremenek2008-11-191-1/+1
| | | | llvm-svn: 59571
* Partial expansion of C++ operator overloading (for binary operators)Douglas Gregor2008-11-185-32/+322
| | | | | | | | | | | | | | | | | | | | | | | | to support operators defined as member functions, e.g., struct X { bool operator==(X&); }; Overloading with non-member operators is supported, and the special rules for the implicit object parameter (e.g., the ability for a non-const *this to bind to an rvalue) are implemented. This change also refactors and generalizes the code for adding overload candidates for overloaded operator calls (C++ [over.match.expr]), both to match the rules more exactly (name lookup of non-member operators actually ignores member operators) and to make this routine more reusable for the other overloaded operators. Testing for the initialization of the implicit object parameter is very light. More tests will come when we get support for calling member functions directly (e.g., o.m(a1, a2)). llvm-svn: 59564
* start converting Sema over to using its canonical Diag method.Chris Lattner2008-11-189-164/+137
| | | | llvm-svn: 59561
* Patch for generation of weak write barriers for objcFariborz Jahanian2008-11-184-8/+39
| | | | | | __weak objects. llvm-svn: 59560
* introduce the one true Diag method for Sema. Next up: kill all the others off.Chris Lattner2008-11-182-6/+5
| | | | llvm-svn: 59556
* Allow diagnostics to be used in bool context, like:Chris Lattner2008-11-181-0/+5
| | | | | | | | return Diag(...); when the function returns bool. This always evaluates to true. llvm-svn: 59555
* Remove the last of the old-style Preprocessor::Diag methods.Chris Lattner2008-11-188-75/+46
| | | | llvm-svn: 59554
* Generate objc_read_weak for __weak objc loads.Fariborz Jahanian2008-11-185-1/+35
| | | | llvm-svn: 59553
* Some basic support toward objective-c's GC code gen.Fariborz Jahanian2008-11-183-4/+68
| | | | llvm-svn: 59543
* Fix <rdar://problem/6329769> [sema] crash on duplication definition of ↵Steve Naroff2008-11-183-5/+20
| | | | | | | | | | interface with protocols. As soon as we detect duplicate interfaces, discontinue further semantic checks (returning the original interface). This is now consistent with how we handle protocols (and less error prone in general). llvm-svn: 59541
* remove this testcase, it fails with -verify stillTorok Edwin2008-11-181-3/+0
| | | | llvm-svn: 59539
* fix test. it now crashes, but thats another problem..Nuno Lopes2008-11-181-2/+2
| | | | llvm-svn: 59537
* Add some quick notes on the clang tests and running the LLVM testDaniel Dunbar2008-11-181-0/+19
| | | | | | suite with clang. llvm-svn: 59536
* Input files should be before link options.Daniel Dunbar2008-11-181-1/+1
| | | | | | | | - PR3094. - No test case, ccc is not really a supported product (llvmc2 already got this right). llvm-svn: 59535
* add testcase for PR3093Torok Edwin2008-11-181-0/+3
| | | | llvm-svn: 59534
* don't dereference a null pointerChris Lattner2008-11-181-0/+1
| | | | llvm-svn: 59533
* As threatened previously: consolidate name lookup and the creation ofDouglas Gregor2008-11-185-84/+49
| | | | | | | | | | | | | | DeclRefExprs and BlockDeclRefExprs into a single function Sema::ActOnDeclarationNameExpr, eliminating a bunch of duplicate lookup-name-and-check-the-result code. Note that we still have the three parser entry points for identifiers, operator-function-ids, and conversion-function-ids, since the parser doesn't (and shouldn't) know about DeclarationNames. This is a Good Thing (TM), and there will be more entrypoints coming (e.g., for C++ pseudo-destructor expressions). llvm-svn: 59527
* Extend DeclarationName to support C++ overloaded operators, e.g.,Douglas Gregor2008-11-1818-105/+260
| | | | | | | | | | | | | | | | | | | | | | | | | | | operator+, directly, using the same mechanism as all other special names. Removed the "special" identifiers for the overloaded operators from the identifier table and IdentifierInfo data structure. IdentifierInfo is back to representing only real identifiers. Added a new Action, ActOnOperatorFunctionIdExpr, that builds an expression from an parsed operator-function-id (e.g., "operator +"). ActOnIdentifierExpr used to do this job, but operator-function-ids are no longer represented by IdentifierInfo's. Extended Declarator to store overloaded operator names. Sema::GetNameForDeclarator now knows how to turn the operator name into a DeclarationName for the overloaded operator. Except for (perhaps) consolidating the functionality of ActOnIdentifier, ActOnOperatorFunctionIdExpr, and ActOnConversionFunctionExpr into a common routine that builds an appropriate DeclRefExpr by looking up a DeclarationName, all of the work on normalizing declaration names should be complete with this commit. llvm-svn: 59526
* Fix 80-col violation.Zhongxing Xu2008-11-181-1/+1
| | | | llvm-svn: 59523
* Add test cast for struct array.Zhongxing Xu2008-11-181-0/+4
| | | | llvm-svn: 59522
* handle the case that the array element is of structure type when bind the ↵Zhongxing Xu2008-11-181-1/+4
| | | | | | whole array to a single value (for example, UnknownVal, UndefinedVal). llvm-svn: 59521
* remove one more Preprocessor::Diag method.Chris Lattner2008-11-184-15/+16
| | | | llvm-svn: 59512
OpenPOWER on IntegriCloud