summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Track alignment in AggValueSlot. No functional change in this patch, but ↵Eli Friedman2011-12-037-30/+59
| | | | | | I'll be introducing uses of the specified alignment soon. llvm-svn: 145736
* Keep track of all of the import declarations that are parsed orDouglas Gregor2011-12-033-3/+26
| | | | | | | implicitly generated in a translation unit. Modules will need this information to identify the actual imports that occurred. llvm-svn: 145734
* When we treat an #include or #import as a module import, create anDouglas Gregor2011-12-025-9/+20
| | | | | | | implicit ImportDecl in the translation unit to record the presence of the import. llvm-svn: 145727
* Introduce a module import declaration, so that we properly represent, e.g.,Douglas Gregor2011-12-028-3/+146
| | | | | | | | __import_module__ std.vector; in the AST. llvm-svn: 145725
* Revert r145697 and dependent patch r145702. It added a dependency fromNick Lewycky2011-12-023-41/+19
| | | | | | lib/Analysis to lib/Sema which is cyclical. llvm-svn: 145724
* Update for change to LLVM TargetMachine API in r145714.Nick Lewycky2011-12-021-34/+37
| | | | llvm-svn: 145715
* Only perform checking of the predefines buffer when loading aDouglas Gregor2011-12-021-2/+2
| | | | | | | | | | | | | precompiled header. Previously, we were trying to gather predefines buffers from all kinds of AST files (which doesn't make sense) and were performing some validation when AST files were loaded as main files. With these tweaks, using PCH files that import modules no longer fails immediately (due to mismatched predefines buffers). However, module visibility is lost, so this feature does not yet work. llvm-svn: 145709
* Make r145697 actually work.Hans Wennborg2011-12-021-1/+1
| | | | | | Use the canonical type of the typedef to compare with the underlying type. llvm-svn: 145702
* Make sure that name lookup in C checks whether a name is hidden.Douglas Gregor2011-12-021-0/+5
| | | | llvm-svn: 145700
* Make conversion specifier warning refer to typedef if possible.Hans Wennborg2011-12-023-19/+41
| | | | | | | | For example, the warning for printf("%zu", 42.0); changes from "conversion specifies type 'unsigned long'" to "conversion specifies type 'size_t' (aka 'unsigned long')" llvm-svn: 145697
* When making a module visible, also make any of its exported modulesDouglas Gregor2011-12-021-0/+12
| | | | | | | visible, allowing one to create modules that import (and then re-export) other modules. llvm-svn: 145696
* Implement (de-)serialization of the set of exported modules in aDouglas Gregor2011-12-023-1/+76
| | | | | | module map. llvm-svn: 145695
* Notify the AST writer (via ASTDeserializationListener) when aDouglas Gregor2011-12-022-0/+11
| | | | | | | (sub)module is read from an AST file. This makes sure that the AST writer knows how to map all modules to their global IDs. llvm-svn: 145685
* Implement name hiding for macro definitions within modules, such thatDouglas Gregor2011-12-022-11/+40
| | | | | | | | only the macro definitions from visible (sub)modules will actually be visible. This provides the same behavior for macros that r145640 provided for declarations. llvm-svn: 145683
* Fix bitfield handling for record layout with #pragma pack. ↵Eli Friedman2011-12-021-3/+5
| | | | | | <rdar://problem/10494810> and PR9560. llvm-svn: 145673
* Add support for AVX registers to clang inline asm. Add a small testcaseEric Christopher2011-12-021-0/+2
| | | | | | | | | and update the Sema testcase with a register that we won't hit for a while I hope. Fixes rdar://10510405 llvm-svn: 145671
* Implementing parsing and resolution of module export declarationsDouglas Gregor2011-12-023-3/+170
| | | | | | | | within module maps, which will (eventually) be used to re-export a module from another module. There are still some pieces missing, however. llvm-svn: 145665
* Fix test regression introduced by r145656. When seeing a string literal ↵Ted Kremenek2011-12-021-1/+6
| | | | | | that isn't accepted by 'asm', skip to the enclosing ')'. llvm-svn: 145662
* Diagnose use of wide string literal in 'asm' instead of crashing. Fixes ↵Ted Kremenek2011-12-021-5/+12
| | | | | | <rdar://problem/10465079>. llvm-svn: 145656
* Fix wrong-code bug when a const automatic variable of struct type has both aRichard Smith2011-12-021-7/+10
| | | | | | | | | | | | mutable member and a constant initializer. We'd previously promoted such variables to global constants, resulting in nasal demons if the mutable member was modified. This is only a temporary fix. The subtle interplay between isConstantInitializer and CGExprConstant is very bug-prone; there are some other issues in this area which I will be addressing in subsequent, more major reworking of this code. llvm-svn: 145654
* When we're passing a vector with an illegal type through memory on x86-64, ↵Eli Friedman2011-12-022-8/+32
| | | | | | use byval so we're sure the backend does the right thing. Fixes va_arg with illegal vectors and an obscure ABI mismatch with __m64 vectors. llvm-svn: 145652
* Driver/Darwin: Add ASAN runtime library link support.Daniel Dunbar2011-12-011-0/+16
| | | | llvm-svn: 145651
* Implement name hiding for declarations deserialized from a non-visibleDouglas Gregor2011-12-013-5/+51
| | | | | | module. When that module becomes visible, so do those declarations. llvm-svn: 145640
* Fix -forwardingTargetForSelector: (GNUstep runtime) which was broken for theDavid Chisnall2011-12-011-0/+2
| | | | | | old dispatch mechanism when I introduced the new one. llvm-svn: 145609
* Add support for AMD's bulldozer.Benjamin Kramer2011-12-011-0/+26
| | | | llvm-svn: 145606
* Introduce the notion of name visibility into modules. For a givenDouglas Gregor2011-12-015-7/+50
| | | | | | | | | | | | | | (sub)module, all of the names may be hidden, just the macro names may be exposed (for example, after the preprocessor has seen the import of the module but the parser has not), or all of the names may be exposed. Importing a module makes its names, and the names in any of its non-explicit submodules, visible to name lookup (transitively). This commit only introduces the notion of name visible and marks modules and submodules as visible when they are imported. The actual name-hiding logic in the AST reader will follow (along with test cases). llvm-svn: 145586
* [analyzer] Make KeychainAPI checker less aggressive. radar://10508828Anna Zaks2011-12-011-3/+5
| | | | | | We trigger an error if free is called after a possibly failed allocation. Do not trigger the error if we know that the buffer is not null. llvm-svn: 145584
* When typo-correction an Objective-C superclass name, don'tDouglas Gregor2011-12-011-4/+9
| | | | | | typo-correct to ourselves. llvm-svn: 145583
* Add Microsoft mangling of constructors and destructors. Patch by Dmitry!Michael J. Spencer2011-12-011-6/+10
| | | | llvm-svn: 145581
* [analyzer] Refactor checkers to use helper function for getting callee Decl ↵Anna Zaks2011-12-0113-111/+49
| | | | | | | | and name. We are getting name of the called function or it's declaration in a few checkers. Refactor them to use the helper function in the CheckerContext. llvm-svn: 145576
* When analyzing a C++ method (without a specific caller), assume 'this' is ↵Ted Kremenek2011-12-011-17/+34
| | | | | | non-null. Fixes <rdar://problem/10508787>. llvm-svn: 145575
* Don't use a varargs convention for calls unprototyped functions where one of ↵Eli Friedman2011-12-013-7/+27
| | | | | | the arguments is an AVX vector. llvm-svn: 145574
* Infer the submodule ID for a given declaration based on the locationDouglas Gregor2011-12-013-4/+52
| | | | | | | of that declaration, and encode the submodule ID in each declaration stored in an AST file. llvm-svn: 145555
* When sending a message to a receiver that has "unknown any" type,Douglas Gregor2011-12-012-3/+16
| | | | | | | force the unknown any type to "id" so that the message send can be completed without requiring a case. Fixes <rdar://problem/10506646>. llvm-svn: 145552
* ParmVarDecls have no linkage. Previously we would report that parametersArgyrios Kyrtzidis2011-12-011-0/+2
| | | | | | | | in type signatures have external linkage. Fixes rdar://10058317. llvm-svn: 145551
* Switch the ID numbers used for submodule IDs in the AST reader over toDouglas Gregor2011-12-013-16/+120
| | | | | | | | a standard global/local scheme, so that submodule definitions will eventually be able to refer to submodules in other top-level modules. We'll need this functionality soonish. llvm-svn: 145549
* Specially whitelist the selector 'addOperationWithBlock:' for the ↵Ted Kremenek2011-12-011-1/+7
| | | | | | | | retain-cycle checking in -Warc-retain-cycles. This commonly is hit by users using NSOperationQueue. Fixes <rdar://problem/10465721>. llvm-svn: 145548
* Further tweak -Wurneachable-code and templates by allowing the warning to run onTed Kremenek2011-12-013-17/+32
| | | | | | | | | explicit template specializations (which represent actual functions somebody wrote). Along the way, refactor some other code which similarly cares about whether or not they are looking at a template instantiation. llvm-svn: 145547
* Fix MSVC class layout for empty classes. Patch by Dmitry Sokolov.Eli Friedman2011-12-011-4/+9
| | | | llvm-svn: 145544
OpenPOWER on IntegriCloud