summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix a tiny goof in the Driver's logic which caused the explicit presenceChandler Carruth2011-02-281-1/+1
| | | | | | | | of -fexceptions to disably C++ exceptions. The correct code was in the ObjC branch, this just mirrors that logic on the C++ side of things. Thanks to John Wiegley for pointing this out. llvm-svn: 126640
* Make skipping of vardecls more precise: it's ok to skip a decl if the entireChris Lattner2011-02-281-3/+18
| | | | | | compound stmt containing the decl is skipped. llvm-svn: 126639
* make switch constant folding a bit stronger, handling a missed case.Chris Lattner2011-02-281-3/+8
| | | | llvm-svn: 126638
* Rename tok::eom to tok::eod.Peter Collingbourne2011-02-2812-99/+99
| | | | | | | | The previous name was inaccurate as this token in fact appears at the end of every preprocessing directive, not just macro definitions. No functionality change, except for a diagnostic tweak. llvm-svn: 126631
* Add a -fcxx-exceptions flag to the frontend, which can be used to enableAnders Carlsson2011-02-284-25/+78
| | | | | | | | | | C++ exceptions, even when exceptions have been turned off using -fno-exceptions. Make the -fobjc-exceptions flag do the same thing, but for Objective-C exceptions. C++ and Objective-C exceptions can also be disabled using -fno-cxx-excptions and -fno-objc-exceptions. llvm-svn: 126630
* Fix CMake build.Anders Carlsson2011-02-281-1/+0
| | | | llvm-svn: 126629
* Retry r126357. Use CharUnits for the Size and DataSize calculations whenKen Dyck2011-02-281-36/+27
| | | | | | | | they are known to be exact multiples of the width of the char type. Add a test case to CodeGen/union.c that would have caught the problem with the previous attempt. No change in functionality intended. llvm-svn: 126628
* [analyzer] Introduce SVal::getAsVarDecl().Argyrios Kyrtzidis2011-02-281-0/+10
| | | | llvm-svn: 126627
* [analzyer] Migrate CallAndMessageChecker to CheckerV2.Argyrios Kyrtzidis2011-02-284-62/+65
| | | | llvm-svn: 126626
* [analyzer] ExprEngine should not depend on checkers for not crashing.Argyrios Kyrtzidis2011-02-281-26/+27
| | | | llvm-svn: 126625
* [analyzer] Migrate AdjustedReturnValueChecker to CheckerV2.Argyrios Kyrtzidis2011-02-284-19/+16
| | | | llvm-svn: 126624
* [analyzer] Migrate AttrNonNullChecker to CheckerV2.Argyrios Kyrtzidis2011-02-284-20/+20
| | | | llvm-svn: 126623
* [analyzer] ExprEngine should not depend on checkers for not crashing.Argyrios Kyrtzidis2011-02-282-4/+19
| | | | llvm-svn: 126622
* [analyzer] Migrate VLASizeChecker to CheckerV2.Argyrios Kyrtzidis2011-02-284-21/+22
| | | | llvm-svn: 126621
* [analyzer] Migrate DivZeroChecker to CheckerV2.Argyrios Kyrtzidis2011-02-284-21/+18
| | | | llvm-svn: 126620
* [analyzer] Migrate ReturnUndefChecker to CheckerV2.Argyrios Kyrtzidis2011-02-284-22/+19
| | | | llvm-svn: 126619
* [analyzer] Migrate UndefinedArraySubscriptChecker to CheckerV2.Argyrios Kyrtzidis2011-02-284-20/+19
| | | | llvm-svn: 126618
* [analyzer] Migrate UndefinedAssignmentChecker to CheckerV2.Argyrios Kyrtzidis2011-02-284-25/+20
| | | | llvm-svn: 126617
* [analyzer] Migrate UndefBranchChecker to CheckerV2.Argyrios Kyrtzidis2011-02-285-23/+38
| | | | llvm-svn: 126616
* [analyzer] Migrate UndefCapturedBlockVarChecker to CheckerV2.Argyrios Kyrtzidis2011-02-284-16/+18
| | | | llvm-svn: 126615
* [analyzer] Migrate UndefResultChecker to CheckerV2.Argyrios Kyrtzidis2011-02-284-16/+18
| | | | llvm-svn: 126614
* [analyzer] Migrate NoReturnFunctionChecker to CheckerV2.Argyrios Kyrtzidis2011-02-284-15/+16
| | | | llvm-svn: 126613
* [analyzer] Move the DeadStores checker out of the 'core' package.Argyrios Kyrtzidis2011-02-282-2/+4
| | | | | | | -Now it gets enabled with '-analyzer-checker=DeadStores'. -The driver passes the above flag by default. llvm-svn: 126612
* [analyzer] Migrate BuiltinFunctionChecker to CheckerV2.Argyrios Kyrtzidis2011-02-284-14/+20
| | | | llvm-svn: 126611
* [analyzer] Migrate OSAtomicChecker to CheckerV2.Argyrios Kyrtzidis2011-02-284-15/+17
| | | | llvm-svn: 126610
* [analyzer] Migrate ArrayBoundCheckerV2 to CheckerV2.Argyrios Kyrtzidis2011-02-285-26/+21
| | | | | | Turns -analyzer-check-buffer-overflows into -analyzer-checker=core.experimental.Overflow llvm-svn: 126609
* [analyzer] Turn -analyzer-stats into -analyzer-checker=debug.StatsArgyrios Kyrtzidis2011-02-285-60/+18
| | | | llvm-svn: 126608
* [analyzer] Remove '-analyzer-experimental-checks' flag.Argyrios Kyrtzidis2011-02-284-32/+0
| | | | llvm-svn: 126607
* [analyzer] Migrate MallocChecker to CheckerV2.Argyrios Kyrtzidis2011-02-285-82/+139
| | | | llvm-svn: 126606
* remove a bogus assertion, add a comment.Chris Lattner2011-02-281-3/+1
| | | | llvm-svn: 126603
* make switch condition constant folding much more aggressive, handling Chris Lattner2011-02-281-1/+68
| | | | | | | compound statements and break statements. This implements enough to handle PR9322 and rdar://6970405. llvm-svn: 126602
* Factor code out into a helper function, ↵Anders Carlsson2011-02-281-11/+20
| | | | | | shouldUseExceptionTablesForObjCExceptions. llvm-svn: 126601
* fix my containsBreak predicate.Chris Lattner2011-02-281-0/+3
| | | | llvm-svn: 126600
* Get rid of the areExceptionsEnabled() getter from LangOptions.Anders Carlsson2011-02-284-7/+7
| | | | llvm-svn: 126598
* First tiny step to implementing PR9322: build infrastructure for only ↵Chris Lattner2011-02-281-0/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | emitting the live case of a switch statement when switching on a constant. This is terribly limited, but enough to handle the trivial example included. Before we would emit: define void @test1(i32 %i) nounwind { entry: %i.addr = alloca i32, align 4 store i32 %i, i32* %i.addr, align 4 switch i32 1, label %sw.epilog [ i32 1, label %sw.bb ] sw.bb: ; preds = %entry %tmp = load i32* %i.addr, align 4 %inc = add nsw i32 %tmp, 1 store i32 %inc, i32* %i.addr, align 4 br label %sw.epilog sw.epilog: ; preds = %sw.bb, %entry switch i32 0, label %sw.epilog3 [ i32 1, label %sw.bb1 ] sw.bb1: ; preds = %sw.epilog %tmp2 = load i32* %i.addr, align 4 %add = add nsw i32 %tmp2, 2 store i32 %add, i32* %i.addr, align 4 br label %sw.epilog3 sw.epilog3: ; preds = %sw.bb1, %sw.epilog ret void } now we emit: define void @test1(i32 %i) nounwind { entry: %i.addr = alloca i32, align 4 store i32 %i, i32* %i.addr, align 4 %tmp = load i32* %i.addr, align 4 %inc = add nsw i32 %tmp, 1 store i32 %inc, i32* %i.addr, align 4 ret void } This improves -O0 compile time (less IR to generate and shove through the code generator) and the clever linux kernel people found a way to fail to build if we don't do this optimization. This step isn't enough to handle the kernel case though. llvm-svn: 126597
* Add some helper methods that will be used in my next patch.Chris Lattner2011-02-282-4/+52
| | | | llvm-svn: 126596
* tidy upChris Lattner2011-02-281-3/+3
| | | | llvm-svn: 126595
* When we encounter a dependent template name within aDouglas Gregor2011-02-287-31/+104
| | | | | | | | | | | | nested-name-specifier, e.g., T::template apply<U>:: represent the dependent template name specialization as a DependentTemplateSpecializationType, rather than a TemplateSpecializationType with a dependent TemplateName. llvm-svn: 126593
* Change the interface to ConstantFoldsToSimpleInteger to not encode Chris Lattner2011-02-275-29/+42
| | | | | | a bool + success into one tri-state integer, simplifying things. llvm-svn: 126592
* Eliminate a silly little Parse/Sema dance when parsing typenameDouglas Gregor2011-02-272-57/+71
| | | | | | | | | | | | | | | | | | | specifiers such as typename T::template apply<U> Previously, we would turn T::template apply<U> into a TemplateSpecializationType. Then, we'd reprocess that TemplateSpecializationType and turn it into either a TemplateSpecializationType wrapped in an ElaboratedType (when we could resolve "apply" to a template declaration) or a DependentTemplateSpecializationType. We now produce the same ASTs but without generating the intermediate TemplateSpecializationType. The end goal here is to avoid generating TemplateSpecializationTypes with dependent template-names, ever. We're not there yet. llvm-svn: 126589
* CMake: updated list of installable header files. PR9321.Oscar Fuentes2011-02-271-12/+17
| | | | llvm-svn: 126572
* Implement delegating constructors partially.Alexis Hunt2011-02-263-9/+79
| | | | | | | | | | | This successfully performs constructor lookup and verifies that a delegating initializer is the only initializer present. This does not perform loop detection in the initialization, but it also doesn't codegen delegating constructors at all, so this won't cause runtime infinite loops yet. llvm-svn: 126552
* Don't assume that whoever is asking for a message send is goingJohn McCall2011-02-261-2/+11
| | | | | | to give us a non-null return slot. llvm-svn: 126544
* Zero-initialize the struct-return slot of an Objective-C messageJohn McCall2011-02-261-0/+2
| | | | | | send before making the call. Fixes rdar://problem/7854674 llvm-svn: 126543
* A much-delayed response to Ken Dyck's review: make this somewhat moreJohn McCall2011-02-261-10/+16
| | | | | | char-width agnostic. llvm-svn: 126542
* Don't crash during constant-evaluation of 1/(1/0). PR9262.John McCall2011-02-261-1/+1
| | | | llvm-svn: 126541
* Pretty up the emission of field l-values and use volatile and TBAA whenJohn McCall2011-02-262-26/+56
| | | | | | | loading references as part of that. Use 'char' TBAA when accessing (immediate!) fields of a may_alias struct; fixes PR9307. llvm-svn: 126540
* Provide a bit saying that a builtin undergoes custom type-checking, thenJohn McCall2011-02-262-19/+50
| | | | | | | don't let calls to such functions go down the normal type-checking path. Test this out with __builtin_classify_type and __builtin_constant_p. llvm-svn: 126539
* Fix objc rewriting bug casting to qualified objective-c pointetr.Fariborz Jahanian2011-02-261-3/+3
| | | | | | // rdar://9056351 llvm-svn: 126536
* Fix a rewriter bug involving call to property'sFariborz Jahanian2011-02-261-5/+6
| | | | | | block. // rdar://9055596 llvm-svn: 126535
OpenPOWER on IntegriCloud