summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Implement modules support for subframeworks (aka embeddedDouglas Gregor2011-12-061-19/+39
| | | | | | | | frameworks). A submodule can now be labeled as a "framework", and header search will look into the appropriate Headers/PrivateHeaders subdirectories for named headers. llvm-svn: 145941
* When building the main file to parse given a module map, don't skipDouglas Gregor2011-12-061-19/+24
| | | | | | | | explicit submodules or umbrella headers from submodules. Instead, build the entire module at once, and let the name-hiding mechanisms hide the contents of explicit submodules at load time. llvm-svn: 145940
* Headers: wmmintrin.h only needs xmmintrin.h.Daniel Dunbar2011-12-061-1/+1
| | | | | | | - Fixes <rdar://problem/10261246> clang -maes option is not sufficient to include <wmmintrin.h> llvm-svn: 145939
* Minor tweak to prepare for submodules with umbrella headers. No actualDouglas Gregor2011-12-061-7/+13
| | | | | | functionality change yet. llvm-svn: 145938
* Install cpuid.h when building with cmake too.Rafael Espindola2011-12-061-0/+1
| | | | llvm-svn: 145935
* Suggest typo corrections for implicit function declarations.Hans Wennborg2011-12-061-1/+25
| | | | | | | A mistyped function call becomes an inmplicit function declaration in C. Suggest typo correction when one can be found. llvm-svn: 145930
* Extend warnings for missing '@end'.Erik Verbruggen2011-12-062-31/+83
| | | | | | Fixes PR2709. llvm-svn: 145928
* Switch a cast to a dyn_cast and check the pointer before using. Fixes a crashRichard Trieu2011-12-061-4/+5
| | | | | | | | | | in the following code: void test4(bool (&x)(void)) { while (x); } llvm-svn: 145918
* Stack realignment is a tristate. Add -mno-stackrealign to turn off all stackNick Lewycky2011-12-063-8/+14
| | | | | | realignment, even with locals with alignment exceeding the ABI guarantee. llvm-svn: 145909
* Minor comment update.Eli Friedman2011-12-061-1/+3
| | | | llvm-svn: 145905
* Implement inferred submodules support, which (when requested)Douglas Gregor2011-12-063-59/+133
| | | | | | | implicitly generates submodules corresponding to the headers that fall within a module. llvm-svn: 145887
* Make sure we perform lvalue-to-rvalue conversions for enum initializers. ↵Eli Friedman2011-12-061-0/+3
| | | | | | PR11484. llvm-svn: 145874
* objc: put out more coherent warning when method definitionFariborz Jahanian2011-12-061-1/+3
| | | | | | attributes don't match its declaration. // rdar://10529259. llvm-svn: 145872
* Add -mstack-alignment=X and fix -mstackrealign handling now that theJoerg Sonnenberger2011-12-053-4/+15
| | | | | | backend options are gone. llvm-svn: 145868
* More refactoring of objc rewriter.Fariborz Jahanian2011-12-051-87/+107
| | | | llvm-svn: 145867
* Parse inferred submodules in module maps, track their contents inDouglas Gregor2011-12-054-11/+143
| | | | | | | Module, and (de-)serialize this information. Semantics of inferred submodules to follow. llvm-svn: 145864
* Make EmitAggregateCopy take an alignment argument. Make EmitFinalDestCopy ↵Eli Friedman2011-12-052-7/+15
| | | | | | | | | | | pass in the correct alignment when known. The test includes a FIXME for a related case involving calls; it's a bit more complicated to fix because the RValue class doesn't keep track of alignment. <rdar://problem/10463337> llvm-svn: 145862
* [analyzer] Rely on LLVM Dominators in Clang dominator computation.Anna Zaks2011-12-054-164/+3
| | | | | | | | (Previously, Clang used it's implementation of dominators.) The patch is contributed by Guoping Long! llvm-svn: 145858
* [analyzer] Mark ConstraintManager::canReasonAbout as protected.Anna Zaks2011-12-051-2/+2
| | | | llvm-svn: 145857
* [analyzer] Simplify the condition.Anna Zaks2011-12-051-3/+1
| | | | | | | | This is a fixup for r145832. The extra clauses do not matter after we remove the dependency on canReasonAbout(InitVal) in r145832. llvm-svn: 145856
* Add a warning for implicit conversion from function literals (and staticLang Hames2011-12-051-0/+19
| | | | | | | | | | | | | methods) to bool. E.g. void foo() {} if (f) { ... // <- Warns here. } Only applies to non-weak functions, and does not apply if the function address is taken explicitly with the addr-of operator. llvm-svn: 145849
* Make isWeakDecl available as a method on ValueDecl.Lang Hames2011-12-051-9/+3
| | | | llvm-svn: 145845
* More objc rewriter refactoring.Fariborz Jahanian2011-12-051-48/+40
| | | | llvm-svn: 145841
* [analyzer] Unify SymbolVal and SymExprVal under a single SymbolValAnna Zaks2011-12-055-181/+175
| | | | | | | | | | | | | | | | class. We are going into the direction of handling SymbolData and other SymExpr uniformly, so it makes less sense to keep two different SVal classes. For example, the checkers would have to take an extra step to reason about each type separately. The classes have the same members, we were just using the SVal kind field for easy differentiation in 3 switch statements. The switch statements look more ugly now, but we can make the code more readable in other ways, for example, moving some code into separate functions. llvm-svn: 145833
* [analyzer] Remove all uses of ConstraintManager::canResonAbout() fromAnna Zaks2011-12-054-53/+52
| | | | | | | | | | | | ExprEngine. Teach SimpleConstraintManager::assumeSymRel() to propagate constraints to symbolic expressions. + One extra warning (real bug) is now generated due to enhanced assumeSymRel(). llvm-svn: 145832
* [analyzer] First step toward removingAnna Zaks2011-12-054-20/+37
| | | | | | | | | | | | | | ConstraintManager::canReasonAbout() from the ExprEngine. ExprEngine should not care if the constraint solver can reason about something or not. The solver should be able to handle all the SymExprs. To do this, the solver should be able to keep track of not only the SymbolData but of all SymExprs. This is why we change SymbolRef to be an alias of SymExpr*. When encountering an expression it cannot simplify, the solver should just add the constraints to it. llvm-svn: 145831
* [analyzer] Minor improvements on RangeConstraint pretty-printing.Anna Zaks2011-12-051-3/+5
| | | | llvm-svn: 145830
* [analyzer] Change RetainCountChecker to use symbol dump method insteadAnna Zaks2011-12-051-2/+3
| | | | | | | | of relying on SymbolID. This way any expression can be printed (not only SymbolData). llvm-svn: 145829
* [analyzer] Add ability to do a simple ProgramState dump() withoutAnna Zaks2011-12-051-36/+58
| | | | | | | | | requiring CFG. Adding more ugly code; the evnvironment printing should be moved to envirnment at some point. llvm-svn: 145828
* [analyzer] Add a debug checker to test for tainted data.Anna Zaks2011-12-053-0/+67
| | | | llvm-svn: 145827
* Some early refactoring of objective-c rewriter.Fariborz Jahanian2011-12-051-76/+79
| | | | llvm-svn: 145824
* [asan] don't require libstdc++ for asan on linux. Mac fix will go separatelyKostya Serebryany2011-12-051-1/+0
| | | | llvm-svn: 145823
* Inferred framework modules automatically export anything they importDouglas Gregor2011-12-051-0/+5
| | | | | | (i.e., 'export *'), to better match the semantics of headers. llvm-svn: 145813
* Fix printing of wildcard exports.Douglas Gregor2011-12-051-5/+14
| | | | llvm-svn: 145812
* Implement support for wildcard exports in modules, allowing a moduleDouglas Gregor2011-12-054-12/+81
| | | | | | | | to re-export anything that it imports. This opt-in feature makes a module behave more like a header, because it can be used to re-export the transitive closure of a (sub)module's dependencies. llvm-svn: 145811
* Actually add a useful bit to the comment pre-FIXMEDouglas Gregor2011-12-051-1/+1
| | | | llvm-svn: 145809
* When writing a module file, keep track of the set of (sub)modules thatDouglas Gregor2011-12-053-30/+89
| | | | | | | it imports, establishing dependencies at the (sub)module granularity. This is not a user-visible change (yet). llvm-svn: 145808
* Support decltype in nested-name-specifiers.David Blaikie2011-12-047-45/+140
| | | | llvm-svn: 145785
* Move block return type inference diagnostic to a common place whereFariborz Jahanian2011-12-031-14/+15
| | | | | | Function or array lvalue conversions happens. llvm-svn: 145782
* Fix mangling substitutions for address-space-qualified classDouglas Gregor2011-12-031-2/+9
| | | | | | types. Patch from Dmitri Rubinstein! llvm-svn: 145776
* Implement support for the __is_final type trait, to determine whetherDouglas Gregor2011-12-036-0/+13
| | | | | | | a class is marked 'final', from Alberto Ganesh Barbati! Fixes PR11462. llvm-svn: 145775
* If block literal return type is not specified, return type of the block is Fariborz Jahanian2011-12-033-2/+16
| | | | | | | inferred from return types. All the return statements have to agree about the type. // rdar://10466373 llvm-svn: 145774
* In Microsoft mode, don't perform typo correction in a template member ↵Francois Pichet2011-12-031-0/+7
| | | | | | | | | | function dependent context because it interferes with the "lookup into dependent bases of class templates" feature. Basically typo correction will try to offer a correction instead of looking into type dependent base classes. I found this problem while parsing Microsoft ATL code with clang. llvm-svn: 145772
* Implement overload resolution for reference-typed parameters supplied with ↵Sebastian Redl2011-12-031-3/+65
| | | | | | initializer lists. llvm-svn: 145769
* Switch LValue so that it exposes alignment in CharUnits. (No functional ↵Eli Friedman2011-12-0310-50/+45
| | | | | | change.) llvm-svn: 145753
* [PCH] Make sure that the SourceExpr of a OpaqueValueExpr is always initializedArgyrios Kyrtzidis2011-12-032-27/+4
| | | | | | | | | | when deserialized, fixing random crashes in libclang. Also simplifies how OpaqueValueExprs are [de]serialized. The reader/writer automatically retains pointer equality of sub-statements (when a statement node is referenced in multiple nodes), so no need to manually handle it. llvm-svn: 145752
* Add a utility to get a RValue for a given LValue for an aggregate; switch a ↵Eli Friedman2011-12-033-7/+9
| | | | | | few places over to it. llvm-svn: 145747
* Switch the Alignment argument on AggValueSlot over to CharUnits, per John's ↵Eli Friedman2011-12-037-20/+17
| | | | | | review comment. llvm-svn: 145741
* Module files representing actual modules don't need to know the set of ↵Douglas Gregor2011-12-031-19/+20
| | | | | | modules they import, since that information isn't actually used. Drop it from the AST file llvm-svn: 145738
* Implement support for precompiled headers, preambles, and serializedDouglas Gregor2011-12-032-0/+42
| | | | | | | | "main" files that import modules. When loading any of these kinds of AST files, we make the modules that were imported visible into the translation unit that loaded the PCH file or preamble. llvm-svn: 145737
OpenPOWER on IntegriCloud