summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Refactor the tree transform's many loops over sets of expressionsDouglas Gregor2011-01-032-126/+102
| | | | | | | | | | | (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-032-3/+6
| | | | | | -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
* Implement support for pack expansions whose pattern is a non-typeDouglas Gregor2011-01-0313-19/+102
| | | | | | | | | | | | | | | | | 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
* 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-032-7/+16
| | | | | | | | | 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-022-5/+5
| | | | 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-021-1/+2
| | | | | | statements using the "x" constraint. llvm-svn: 122679
* Produce a better error message for invalid register names.Rafael Espindola2011-01-012-5/+6
| | | | 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-302-3/+34
| | | | | | | | | | | | | | 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-301-0/+36
| | | | | | 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-291-3/+5
| | | | | | | | 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
* Canonicalize types before possible cast.Abramo Bagnara2010-12-281-1/+2
| | | | llvm-svn: 122592
* More __uuidof validation:Francois Pichet2010-12-271-18/+23
| | | | | | | 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-261-1/+4
| | | | llvm-svn: 122564
* The -fshort-wchar option causes wchar_t to become unsigned, in addition to beingChris Lattner2010-12-2511-24/+47
| | | | | | | 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-242-5/+38
| | | | | | | | 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-2489-31485/+0
| | | | llvm-svn: 122543
* Handle locations coming from macro instantiations properly in ↵Argyrios Kyrtzidis2010-12-241-0/+7
| | | | | | | | 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-2415-411/+321
| | | | | | | 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-241-4/+4
| | | | | | | | 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-241-0/+8
| | | | llvm-svn: 122533
* When instantiating a non-type template parameter pack, be sure toDouglas Gregor2010-12-244-5/+19
| | | | | | | | 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-2311-20/+44
| | | | | | | | | | | | | | 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-231-12/+16
| | | | | | | | | | | | | | | 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-236-22/+190
| | | | | | | | | | | | 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-236-2/+26
| | | | | | | | | | | | 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-23182-234/+31719
| | | | | | | | | | | | 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
* Reimplement the comparison of a class template partialDouglas Gregor2010-12-231-83/+26
| | | | | | | | | | | 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-231-9/+26
| | | | | | | | | 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
* Rename headers: 'clang/GR' 'clang/EntoSA' andTed Kremenek2010-12-2393-234/+234
| | | | | | update Makefile. llvm-svn: 122493
* Rename static analyzer namespace 'GR' to 'ento'.Ted Kremenek2010-12-2386-164/+164
| | | | llvm-svn: 122492
* Further tweak nonloc::ConcreteInt pretty printingTed Kremenek2010-12-231-2/+5
| | | | | | | to correctly print out negative values for signed integers. llvm-svn: 122470
* Add WIP prototype of a new buffer overflowTed Kremenek2010-12-235-2/+287
| | | | | | | checker based on using raw (symbolic) byte offsets from a base region. llvm-svn: 122469
* Change MemRegion extent type to be the same type usedTed Kremenek2010-12-231-5/+5
| | | | | | for array indices. llvm-svn: 122468
* Enhance pretty-printing for nonloc::ConcreteIntTed Kremenek2010-12-231-4/+6
| | | | | | | to also include signedness and bitwidth of the underlying integer. llvm-svn: 122466
* Implement the part of C++0x [temp.arg.explicit]p3 that pertains toDouglas Gregor2010-12-231-1/+11
| | | | | | | | | | | | parameter packs. In particular, a parameter pack not otherwise deduced is deduced to an empty parameter pack. The C++0x wording here is a bit unfortunate; this should really only apply to function templates, and it mentions "trailing" parameter packs, which doesn't really make sense in the context of function templates. Will file a core issue separately. llvm-svn: 122463
* Implement the rest of C++0x [temp.deduct.type]p9, which specifies thatDouglas Gregor2010-12-231-3/+57
| | | | | | | | the presence of a pack expansion anywhere except at the end of a template-argument-list causes the entire template-argument-list to be a non-deduced context. llvm-svn: 122461
OpenPOWER on IntegriCloud