summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Refactor the tree transform's many loops over sets of expressionsDouglas Gregor2011-01-035-139/+139
| | | | | | | | | | | (transforming each in turn) into calls into one central routine (TransformExprs) that transforms a list of expressions. This refactoring is preparatory work for pack expansions whose in an expression-list. No functionality change. llvm-svn: 122761
* Guard lazy synthesis of provisional ivars under the newFariborz Jahanian2011-01-033-4/+7
| | | | | | -fobjc-default-synthesize-properties flag. llvm-svn: 122757
* In the latest episode of "Deserializing bugs caused by accessors" the series ↵Argyrios Kyrtzidis2011-01-031-9/+9
| | | | | | | | | | reached a thrilling climax when FunctionDecl::setPure crashed a poor user's code. Remove the use of this accessor when deserializing, along with several other in the neighborhood. Fixes rdar://8759653. llvm-svn: 122756
* Fix PR8654, ensuring each branch of an #if, #elif, #else, ... chainChandler Carruth2011-01-031-1/+12
| | | | | | | | receives a PPCallback. Patch by Richard Smith. llvm-svn: 122755
* Support lit fixes for PR8199David Greene2011-01-031-1/+1
| | | | | | | | Replace "clang++" with "clang\+\+" because we have to escape regexp special characters now. This is in preparation for changes to lit to fix PR8199. Tests will fail until the lit part gets committed. llvm-svn: 122753
* Another variadic template metafunction test case: summing values.Douglas Gregor2011-01-031-2/+16
| | | | llvm-svn: 122752
* Implement support for pack expansions whose pattern is a non-typeDouglas Gregor2011-01-0321-22/+223
| | | | | | | | | | | | | | | | | template argument (described by an expression, of course). For example: template<int...> struct int_tuple { }; template<int ...Values> struct square { typedef int_tuple<(Values*Values)...> type; }; It also lays the foundation for pack expansions in an initializer-list. llvm-svn: 122751
* Use some of the llvm cmake infraestructure. This takes care ofOscar Fuentes2011-01-031-11/+2
| | | | | | | disabling rtti and exceptions where requested. Remove some unnecessary code too. llvm-svn: 122750
* Consolidate template metafunction tests for variadic templates into a single ↵Douglas Gregor2011-01-032-28/+32
| | | | | | file llvm-svn: 122748
* Set LLVM_NO_RTTI and LLVM_USED_LIBS for clangStaticAnalyzerCheckersOscar Fuentes2011-01-031-0/+4
| | | | | | Patch by arrowdodger! llvm-svn: 122747
* When we attempt to create a built-in that involves a library type weDouglas Gregor2011-01-034-12/+26
| | | | | | | | | don't have access to (e.g., fprintf, which needs the library type FILE), fail with a warning and forget about the builtin entirely. Previously, we would actually provide an error, which breaks autoconf's super-lame checks for fprintf, longjmp, etc. Fixes PR8316. llvm-svn: 122744
* Funciton -> FunctionPeter Collingbourne2011-01-021-3/+3
| | | | llvm-svn: 122709
* Unkown -> UnknownPeter Collingbourne2011-01-023-7/+7
| | | | llvm-svn: 122708
* Remove obsolete comments.Francois Pichet2011-01-021-7/+0
| | | | llvm-svn: 122686
* Add support for passing variables declared to use a xmm register to asmRafael Espindola2011-01-022-1/+34
| | | | | | statements using the "x" constraint. llvm-svn: 122679
* Produce a better error message for invalid register names.Rafael Espindola2011-01-013-5/+10
| | | | llvm-svn: 122670
* Fix typo and add comment.Rafael Espindola2011-01-011-5/+8
| | | | llvm-svn: 122669
* Remove stray emacs mode markers in all these files that was causing emacs toNick Lewycky2010-12-3113-14/+14
| | | | | | | open them in fundamental-mode instead of c++-mode. Also twiddle whitespace for consistency in ToolChains.cpp. llvm-svn: 122646
* MSVC doesn't require an accessible copy-constructor when binding a temporary ↵Francois Pichet2010-12-311-1/+1
| | | | | | | | | | class object to a const-reference. Note: this is not a C++0x behavior change, it was already like that in MSVC 2003. This fixes a compile error when parsing MSVC header files with clang. llvm-svn: 122644
* Add support for declaring register contraints in variables. They are only usedRafael Espindola2010-12-303-3/+61
| | | | | | | | | | | | | | in asm statements: register int foo asm("rdi"); asm("..." : ... "r" (foo) ... We also only accept these variables if the constraint in the asm statement is "r". This fixes most of PR3933. llvm-svn: 122643
* Correct function name in comment.Nick Lewycky2010-12-301-1/+1
| | | | llvm-svn: 122640
* Expose Objective-C type encodings of declarations to libclang users. This ↵David Chisnall2010-12-306-0/+75
| | | | | | also adds a method in ASTContext which encodes FunctionDecls using the same encoding format that is used for Objective-C methods. llvm-svn: 122639
* Simplify mem{cpy, move, set} creation with IRBuilder.Benjamin Kramer2010-12-308-108/+30
| | | | llvm-svn: 122634
* Fix PR8796.Rafael Espindola2010-12-292-3/+18
| | | | | | | | The problem was that we were asserting the we never added an empty class to the same offset twice. This is not true for unions, where two members, empty or not, can have the some offset. llvm-svn: 122633
* set features for k8-sse3Roman Divacky2010-12-291-0/+3
| | | | llvm-svn: 122629
* Added scalar casts test.Abramo Bagnara2010-12-281-0/+141
| | | | llvm-svn: 122599
* Canonicalize types before possible cast.Abramo Bagnara2010-12-281-1/+2
| | | | llvm-svn: 122592
* More __uuidof validation:Francois Pichet2010-12-272-18/+39
| | | | | | | 1. Do not validate for uuid attribute if the type is template dependent. 2. Search every class declaration and definition for the uuid attribute. llvm-svn: 122578
* Add support for GNU runtime property set / get structure functions. Minor ↵David Chisnall2010-12-264-23/+57
| | | | | | refactoring of Mac runtime (returns the same function for both, as the Mac runtimes currently only provide a single entry point for setting and getting struct properties, although this will presumably be fixed at some point). llvm-svn: 122569
* Fix for PR8695.David Chisnall2010-12-262-1/+9
| | | | llvm-svn: 122564
* The -fshort-wchar option causes wchar_t to become unsigned, in addition to beingChris Lattner2010-12-2518-32/+70
| | | | | | | 16-bits in size. Implement this by splitting WChar into two enums, like we have for char. This fixes a miscompmilation of XULRunner, PR8856. llvm-svn: 122558
* Remove all uses of PathV1::GetRootDirectory.Michael J. Spencer2010-12-251-7/+6
| | | | llvm-svn: 122552
* Add basic support for pointer arithmetic inTed Kremenek2010-12-245-20/+46
| | | | | | | | SimpleSValBuilder. This clears up some false positives emitted by ArrayBoundCheckerV2 due to the lack of support for pointer arithmetic. llvm-svn: 122546
* Remove the EntoSA directories.Argyrios Kyrtzidis2010-12-24122-39458/+0
| | | | llvm-svn: 122543
* don't use #pragma mark, it isn't portable.Chris Lattner2010-12-241-7/+7
| | | | llvm-svn: 122540
* ifndef _MSC_VER out #pragma mark on MSVC. It still tries to parse the text evenMichael J. Spencer2010-12-241-0/+4
| | | | | | though it doesn't know what it is, and complains about invalid tokens ;/. llvm-svn: 122538
* Handle locations coming from macro instantiations properly in ↵Argyrios Kyrtzidis2010-12-242-0/+17
| | | | | | | | SourceManager::isBeforeInTranslationUnit(). Fixes rdar://8790245 and http://llvm.org/PR8821. llvm-svn: 122536
* Refactor how we collect attributes during parsing, and add slots for attributesJohn McCall2010-12-2418-500/+524
| | | | | | | on array and function declarators. This is pretty far from complete, and I'll revisit it later if someone doesn't beat me to it. llvm-svn: 122535
* Fix a thinko in a helper routine for template argument deduction thatDouglas Gregor2010-12-242-5/+35
| | | | | | | | caused an assertion when dealing with non-type template parameter packs. Add some tests for deduction and instantiation of non-type template parameter packs. llvm-svn: 122534
* Non-type template parameter packs cannot have default arguments.Douglas Gregor2010-12-242-0/+18
| | | | llvm-svn: 122533
* When instantiating a non-type template parameter pack, be sure toDouglas Gregor2010-12-245-10/+44
| | | | | | | | extract the appropriate argument from the argument pack (based on the current substitution index, of course). Simple instantiation of pack expansions involving non-type template parameter packs now works. llvm-svn: 122532
* Add an AST representation for non-type template parameterDouglas Gregor2010-12-2318-30/+93
| | | | | | | | | | | | | | packs, e.g., template<typename T, unsigned ...Dims> struct multi_array; along with semantic analysis support for finding unexpanded non-type template parameter packs in types, expressions, and so on. Template instantiation involving non-type template parameter packs probably doesn't work yet. That'll come soon. llvm-svn: 122527
* Improve the diagnostic and recovery for missing colons after 'case'Douglas Gregor2010-12-232-13/+25
| | | | | | | | | | | | | | | and 'default' statements, including a Fix-It to add the colon: test/Parser/switch-recovery.cpp:13:12: error: expected ':' after 'case' case 17 // expected-error{{expected ':' after 'case'}} ^ : test/Parser/switch-recovery.cpp:16:12: error: expected ':' after 'default' default // expected-error{{expected ':' after 'default'}} ^ : llvm-svn: 122522
* Implement parsing of function parameter packs and non-type templateDouglas Gregor2010-12-2311-22/+308
| | | | | | | | | | | | parameter packs (C++0x [dcl.fct]p13), including disambiguation between unnamed function parameter packs and varargs (C++0x [dcl.fct]p14) for cases like void f(T...) where T may or may not contain unexpanded parameter packs. llvm-svn: 122520
* Add -fobjc-default-synthesized-properties flagTed Kremenek2010-12-2318-10/+48
| | | | | | | | | | | | to allow us to explicitly control whether or not Objective-C properties are default synthesized. Currently this feature only works when using the -fobjc-non-fragile-abi2 flag (so there is no functionality change), but we can now turn off this feature without turning off all the features coupled with -fobjc-non-fragile-abi2. llvm-svn: 122519
* Chris Lattner has strong opinions about directoryTed Kremenek2010-12-23255-285/+39743
| | | | | | | | | | | | layout. :) Rename the 'EntoSA' directories to 'StaticAnalyzer'. Internally we will still use the 'ento' namespace for the analyzer engine (unless there are further sabre rattlings...). llvm-svn: 122514
* Kill RecordType::getAddressSpace() and its fixme; that's just not howJohn McCall2010-12-232-7/+0
| | | | | | address spaces work. llvm-svn: 122511
* Reimplement the comparison of a class template partialDouglas Gregor2010-12-233-85/+40
| | | | | | | | | | | specialization's template arguments against the primary template's template arguments using the obvious, correct method of checking the injected-class-name type (C++ [temp.class.spec]p9b3). The previous incarnation of this comparison attempted to use its own formulation of the injected-class-name, which is redudant and, with the introduction of variadic templates, became wrong (again). llvm-svn: 122508
* When forming the injected-class-name of a variadic template, theDouglas Gregor2010-12-232-9/+67
| | | | | | | | | template argument corresponding to a template parameter pack is an argument pack of a pack expansion of that template parameter pack. Implements C++0x [temp.dep.type]p2 (at least, as much of it as we can). llvm-svn: 122498
* When cast derived to base, only process MemRegionVal.Zhongxing Xu2010-12-231-2/+5
| | | | llvm-svn: 122494
OpenPOWER on IntegriCloud