summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Relax valid location check. This fixes a clang crash while emitting debug ↵Devang Patel2012-02-061-2/+4
| | | | | | info for properties that are synthesized by the compiler by default. llvm-svn: 149929
* build wide strings with ConstantDataArray, just because we can.Chris Lattner2012-02-061-12/+18
| | | | llvm-svn: 149928
* improve the code that handles IR generation of byte-sized string literals to ↵Chris Lattner2012-02-061-35/+19
| | | | | | | | avoid allocating an std::string. llvm-svn: 149924
* Added source location for the template keyword in ↵Abramo Bagnara2012-02-068-43/+29
| | | | | | | | | | DependentTemplateSpecializationTypeLoc nodes (DTSTLoc). The new info is propagated to TSTLoc on template instantiation, getting rid of 3 FIXMEs in TreeTransform.h and another one Parser.cpp. Simplified code in TypeSpecLocFiller visitor methods for DTSTLoc and DependentNameTypeLoc by removing what now seems to be dead code (adding corresponding assertions). llvm-svn: 149923
* use cheaper llvm APIs for various bits of IR generation.Chris Lattner2012-02-063-39/+23
| | | | llvm-svn: 149916
* simplify code and smallvectorize.Chris Lattner2012-02-061-6/+7
| | | | llvm-svn: 149915
* Canonicalize the base class used in the nested-name-specifier of a generatedManuel Klimek2012-02-061-1/+2
| | | | | | assignment operator. llvm-svn: 149909
* Fix the result of VarDecl::checkInitIsICE so it is consistently accurate in ↵Eli Friedman2012-02-061-1/+1
| | | | | | C++11 mode. PR11928. llvm-svn: 149908
* Tweak format string checking to work with %@ and ObjC toll-free bridging. ↵Ted Kremenek2012-02-061-3/+17
| | | | | | <rdar://problem/10814120> llvm-svn: 149907
* Rewrite the debug action handling to take -verify into account.Eric Christopher2012-02-062-18/+17
| | | | | | | Add a quiet option for dwarfdump and move it out of NDEBUG only. Still requires an option as we don't want this on by default. llvm-svn: 149894
* Update the command line here and update the comment, we're just goingEric Christopher2012-02-062-3/+4
| | | | | | to leave this as a debug only option for now. llvm-svn: 149890
* Removed redundant location info from ElaboratedTypeLoc / DependentNameLoc / ↵Abramo Bagnara2012-02-068-30/+30
| | | | | | DependentTSTLoc. Uniformed names referencing elaborated keyword. No intended functionality changes. llvm-svn: 149889
* objc: fixes a problem in block type comparison involvingFariborz Jahanian2012-02-061-2/+4
| | | | | | | | enums with underlying type explicitly specified (feature which is on by default in objective-c). // rdar://10798770 llvm-svn: 149888
* Let an ivar directly refer property TAG.Devang Patel2012-02-061-2/+1
| | | | llvm-svn: 149881
* - Turn the other distribution checks into range compares.Benjamin Kramer2012-02-061-18/+14
| | | | | | | - Turn openSUSE version parsing into a StringSwitch - Add an entry for Fedora release 16 (Verne) llvm-svn: 149872
* Added location for template keyword in TemplateSpecializationTypeLoc. In the ↵Abramo Bagnara2012-02-0612-65/+75
| | | | | | process removed some naming ambiguities. llvm-svn: 149870
* Consolidate the ubuntu detection logic a bit, add an entry for Ubuntu 12.04 ↵Benjamin Kramer2012-02-061-28/+20
| | | | | | aka precise pangolin. llvm-svn: 149869
* Fixed instantiation of DependentScopeDeclRefExpr.Abramo Bagnara2012-02-066-25/+27
| | | | llvm-svn: 149868
* Move instantiateTemplateAttribute into the sema namespace, make helpers static.Benjamin Kramer2012-02-065-7/+12
| | | | llvm-svn: 149864
* Fix vector splat casts to cast element to the appropriate vector element ↵Craig Topper2012-02-061-0/+2
| | | | | | before inserting into the vector. Fixes PR11930. llvm-svn: 149855
* Implement name mangling for scalar value initialization. Reported on IRC by Xeo.Richard Smith2012-02-061-1/+6
| | | | llvm-svn: 149854
* Invalid O levels on the command line no longer have a confusing error.Aaron Ballman2012-02-061-4/+5
| | | | llvm-svn: 149852
* Move operator overload out of line. Calling operator<< on a forward declared ↵Benjamin Kramer2012-02-051-0/+6
| | | | | | type doesn't seem to work on MSVC. llvm-svn: 149819
* constexpr: Implement DR1358: An instantiation of a constexpr function whichRichard Smith2012-02-052-3/+4
| | | | | | | can't produce a constant expression is not ill-formed (so long as some instantiation of that function can produce a constant expression). llvm-svn: 149802
* reapply the patches reverted in r149477, which enable ConstantDataArray.Chris Lattner2012-02-055-37/+39
| | | | llvm-svn: 149801
* Basic: import SmallString<> into clang namespaceDylan Noblesmith2012-02-05102-233/+233
| | | | | | | (I was going to fix the TODO about DenseMap too, but that would break self-host right now. See PR11922.) llvm-svn: 149799
* Basic: import OwningPtr<> into clang namespaceDylan Noblesmith2012-02-0572-159/+159
| | | | llvm-svn: 149798
* constexpr: Fix implementation of DR1311: check for volatile qualifiers inRichard Smith2012-02-051-2/+5
| | | | | | | lvalue-to-rvalue conversions on the source type of the conversion, not the target type (which has them removed for non-class types). llvm-svn: 149796
* Preserve alignment for Neon vld1_lane/dup and vst1_lane intrinsics.Bob Wilson2012-02-041-7/+17
| | | | | | | | We had been generating load/store instructions with the default alignment for the vector element type, even when the pointer argument had less alignment. <rdar://problem/10538555> llvm-svn: 149794
* A useful approximation of initializer list constructors.Sebastian Redl2012-02-042-21/+43
| | | | llvm-svn: 149792
* Factor out the actual overload resolution from TryConstructorInitialization, ↵Sebastian Redl2012-02-041-53/+70
| | | | | | since it needs to be used again for list constructor resolution. llvm-svn: 149791
* Don't unwrap initializer lists before calling TryConstructorInitialization, ↵Sebastian Redl2012-02-041-19/+30
| | | | | | instead doing a little more work inside. This should make finding initializer list constructors easier, as well as fix one place where the ({}) vs {} issue was probably poorly handled. llvm-svn: 149790
* Move a method from IdentifierTable.h out of line and remove the SmallString ↵Benjamin Kramer2012-02-0448-14/+64
| | | | | | | | include. Fix all the transitive include users. llvm-svn: 149783
* Remove Diagnostic.h include from Preprocessor.h.Benjamin Kramer2012-02-046-3/+22
| | | | | | | - Move the offending methods out of line and fix transitive includers. - This required changing an enum in the PPCallback API into an unsigned. llvm-svn: 149782
* Move various diagnostic operator<< overloads out of line and remove includes ↵Benjamin Kramer2012-02-0426-1/+75
| | | | | | | | | of Diagnostic.h. Fix all the files that depended on transitive includes of Diagnostic.h. With this patch in place changing a diagnostic no longer requires a full rebuild of the StaticAnalyzer. llvm-svn: 149781
* Move Storage and StorageAllocator out of the PartialDiagnostic class so we ↵Benjamin Kramer2012-02-042-2/+8
| | | | | | | | | can forward declare them. Let ASTContext allocate the storage in its BumpPtrAllocator. This will help us remove ASTContext's depedency on PartialDiagnostic.h soon. llvm-svn: 149780
* In C++11 mode, when an integral constant expression is desired and we have aRichard Smith2012-02-0411-141/+202
| | | | | | | | | | | | | | | | | | value of class type, look for a unique conversion operator converting to integral or unscoped enumeration type and use that. Implements [expr.const]p5. Sema::VerifyIntegerConstantExpression now performs the conversion and returns the converted result. Some important callers of Expr::isIntegralConstantExpr have been switched over to using it (including all of those required for C++11 conformance); this switch brings a side-benefit of improved diagnostics and, in several cases, simpler code. However, some language extensions and attributes have not been moved across and will not perform implicit conversions on constant expressions of literal class type where an ICE is required. In passing, fix static_assert to perform a contextual conversion to bool on its argument. llvm-svn: 149776
* Don't allow a value of a scoped enumeration to be used as the first bound for anRichard Smith2012-02-043-11/+29
| | | | | | | array new expression. This lays some groundwork for the implicit conversion to integral or unscoped enumeration which C++11 ICEs undergo. llvm-svn: 149772
* [analyzer] Make sure Containers OutOfBounds checker does not crash on ↵Anna Zaks2012-02-041-20/+14
| | | | | | undefined arguments, when CF functions are called with wrong number of arguments. llvm-svn: 149771
* Disallow constexpr main.Richard Smith2012-02-041-2/+7
| | | | llvm-svn: 149770
* Fix a rejects-valid in C++11: array new of a negative size, or overflowing arrayRichard Smith2012-02-041-16/+32
| | | | | | | | | | | | | | | | | new, is well-formed with defined semantics of throwing (a type which can be caught by a handler for) std::bad_array_new_length, unlike in C++98 where it is somewhere nebulous between undefined behavior and ill-formed. If the array size is an integral constant expression and satisfies one of these criteria, we would previous the array new expression, but now in C++11 mode, we merely issue a warning (the code is still rejected in C++98 mode, naturally). We don't yet implement new C++11 semantics correctly (see PR11644), but we do implement the overflow checking, and (for the default operator new) convert such expressions to an exception, so accepting such code now does not seem especially unsafe. llvm-svn: 149767
* ArrayRef goodness in MultiplexConsumer, no functionality change.Argyrios Kyrtzidis2012-02-041-2/+3
| | | | llvm-svn: 149764
* Don't warn on use of default allocator with an over-aligned type when theNick Lewycky2012-02-041-1/+1
| | | | | | allocator is given the pointer to allocate into. llvm-svn: 149760
* Fix ASTMerge tests that I broke in my previous commit.Argyrios Kyrtzidis2012-02-041-1/+1
| | | | llvm-svn: 149759
* [analyzer] Turn on by default two checkers:Anna Zaks2012-02-041-11/+12
| | | | | | | - osx.coreFoundation.containers.IndexOutOfBounds - osx.cocoa.SelfInit llvm-svn: 149747
* [analyzer] Minor cleanups to the ObjCSelfInitChecker.Anna Zaks2012-02-043-17/+7
| | | | | | (Also renames in other ObjC checkers to create one category of checks.) llvm-svn: 149745
* Comment mystery code.Nick Lewycky2012-02-041-0/+2
| | | | llvm-svn: 149742
* Use variable in place of multiple CI.getFrontendOpts() calls and use a bitArgyrios Kyrtzidis2012-02-042-10/+11
| | | | | | of ArrayRef goodness. No functionality change. llvm-svn: 149739
* Clang has existing support for debuggers thatSean Callanan2012-02-042-1/+4
| | | | | | | | | | | | | | | | | | | | want to provide "po"-like functionality which treats the result of an expression implicitly as "id" (if it is not otherwise known) and prints it as an Objective-C object. This has in the past been gated by the "DebuggerSupport" language option, but that is too general. Debuggers also provide other commands like "print" that do not make any assumptions about whether the object is an Objective-C object. This patch makes the assumption conditional on a new language option: DebuggerCastResultToId. I have also made corresponding modifications to the testsuite. llvm-svn: 149735
* Create new tag for the property. This is a work in progress.Devang Patel2012-02-041-1/+7
| | | | llvm-svn: 149734
OpenPOWER on IntegriCloud