summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Specially whitelist the selector 'addOperationWithBlock:' for the ↵Ted Kremenek2011-12-012-1/+41
| | | | | | | | 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-015-17/+45
| | | | | | | | | 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-012-4/+17
| | | | llvm-svn: 145544
* Another GCC fixDouglas Gregor2011-11-301-1/+1
| | | | llvm-svn: 145542
* Revert most of r145372 for now. Lookahead beyond the ';' in a functionRichard Smith2011-11-306-73/+1
| | | | | | | | | declaration tickles a bug in the way we handle visibility pragmas. The improvement to error recovery for template function definitions declared with the 'typedef' specifier in r145372 is unrelated and not reverted here. llvm-svn: 145541
* Unbreak build with GCC. Clang is too lame to diagnose this particular ↵Douglas Gregor2011-11-301-2/+0
| | | | | | ill-formedness llvm-svn: 145539
* Promote ModuleMap::Module to a namespace-scope class in the BasicDouglas Gregor2011-11-3031-465/+507
| | | | | | | | | library, since modules cut across all of the libraries. Rename serialization::Module to serialization::ModuleFile to side-step the annoying naming conflict. Prune a bunch of ModuleMap.h includes that are no longer needed (most files only needed the Module type). llvm-svn: 145538
* [PCH] In ASTReader::FinishedDeserializing, after we do ↵Argyrios Kyrtzidis2011-11-303-29/+77
| | | | | | | | | | | | | PassInterestingDeclsToConsumer we may end up having added more pending stuff to do, so go in a loop until everything is cleared out. This fixes the error in rdar://10278815 which has a certain David Lynch-esque quality.. error: unknown type name 'BOOL'; did you mean 'BOOL'? llvm-svn: 145536
* Test case for fix committed in r145441.Lang Hames2011-11-301-0/+3
| | | | llvm-svn: 145534
* make asan work at -O0, clang part. Patch by glider@google.comKostya Serebryany2011-11-301-0/+2
| | | | llvm-svn: 145531
* Per an offline conversation with John McCall, have StmtPrinter actually ↵Ted Kremenek2011-11-302-7/+10
| | | | | | print out the source expression for OpaqueValueExpr. llvm-svn: 145524
* Don't run -Wunreachable-code on template instantiations. Different ↵Ted Kremenek2011-11-302-2/+30
| | | | | | instantiations may produce different unreachable code results, and it is very difficult for us to prove that ALL instantiations of a template have specific unreachable code. If we come up with a better solution, then we can revisit this, but this approach will at least greatly reduce the noise of this warning for code that makes use of templates. llvm-svn: 145520
* Don't collide loop variable names (to appease GCC)Matt Beaumont-Gay2011-11-301-7/+6
| | | | llvm-svn: 145515
* Note that we'll need to handle __include_macros specially in the module loaderDouglas Gregor2011-11-301-0/+1
| | | | llvm-svn: 145514
* Get the -march argument based on the target MIPS architecture or cpu and passAkira Hatanaka2011-11-301-7/+32
| | | | | | | | | it to GNU assembler. In addition, change function getMipsArchFromCPU() so that it can be reused in ConstructJob(). Patch by Simon Atanasyan. llvm-svn: 145509
* Update CMake build.Benjamin Kramer2011-11-301-0/+1
| | | | llvm-svn: 145506
* Move the module auto-import logic after the logic that allows aDouglas Gregor2011-11-301-29/+29
| | | | | | | | | | callback client to suggest an alternative search path and after we complain when the included file can't be found. The former can't be tested in isolation, the latter doesn't actually matter (because we won't make a module suggestion if no header is available). However, the flow is better this way. llvm-svn: 145502
* Trivial indentation fix for the code I just committedDouglas Gregor2011-11-301-3/+3
| | | | llvm-svn: 145501
* Introduce an opt-in warning indicating when the compiler is treatingDouglas Gregor2011-11-305-3/+50
| | | | | | an #include/#import as a module import. llvm-svn: 145500
* Implement (de-)serialization of the description of a module and itsDouglas Gregor2011-11-3010-37/+306
| | | | | | | | | submodules. This information will eventually be used for name hiding when dealing with submodules. For now, we only use it to ensure that the module "key" returned when loading a module will always be a module (rather than occasionally being a FileEntry). llvm-svn: 145497
* [analyzer] Add checker callback documentation.Anna Zaks2011-11-302-5/+226
| | | | llvm-svn: 145495
* Use raw_ostream::indent.Benjamin Kramer2011-11-301-8/+4
| | | | llvm-svn: 145492
* Switch the module map printer over toDouglas Gregor2011-11-301-27/+2
| | | | | | raw_ostream::write_escaped. Thanks, Benjamin! llvm-svn: 145491
* Add preprocessor-only test for submodule importsDouglas Gregor2011-11-301-0/+1
| | | | llvm-svn: 145490
* Fix the instantiation of pseudo-object expressions. This is aJohn McCall2011-11-304-2/+103
| | | | | | | | | really bad way to go about this, but I'm not sure there's a better choice without substantial changes to TreeTransform --- most notably, preserving implicit semantic nodes instead of discarding and rebuilding them. llvm-svn: 145480
* When writing a module file, pass the module through to the ASTDouglas Gregor2011-11-307-23/+26
| | | | | | writer. No functionality change. llvm-svn: 145479
* Teach the preprocessor how to handle module import declarations thatDouglas Gregor2011-11-304-9/+47
| | | | | | | involve submodules (e.g., importing std.vector), rather than always importing the top-level module. llvm-svn: 145478
* When loading a module that involves submodules (e.g., std.vector),Douglas Gregor2011-11-307-82/+187
| | | | | | | | | check whether the named submodules themselves are actually valid, and drill down to the named submodule (although we don't do anything with it yet). Perform typo correction on the submodule names when possible. llvm-svn: 145477
* Add bigger method type encodings to protocol objects. <rdar://problem/10492418>Bob Wilson2011-11-303-29/+144
| | | | | | | | | | | | | | | | | | The new metadata are method @encode strings with additional data. 1. Each Objective-C object is marked with its class name and protocol names. The same is done for property @encode already. 2. Each block object is marked with its function prototype's @encoding. For example, a method parameter that is a block object that itself returns void and takes an int would look like: @?<v@?i> These new method @encode strings are stored in a single array pointed to by structs protocol_t and objc_protocol_ext. Patch provided by Greg Parker! llvm-svn: 145469
* when -faddress-sanitizer is present, add required flags to the linker ↵Kostya Serebryany2011-11-301-0/+24
| | | | | | command (linux-only) llvm-svn: 145467
* Switch the module-loading interfaces and parser from a simpleDouglas Gregor2011-11-309-51/+69
| | | | | | | top-level module name to a module path (e.g., std.vector). We're still missing a number of pieces for this actually to do something. llvm-svn: 145462
* Make sure that forward declarations are marked as such in the debug infoEric Christopher2011-11-292-1/+7
| | | | | | | | for the structure type. rdar://10499337 llvm-svn: 145461
* [libclang] Do the ConcurrencyCheck at the beginning of ↵Argyrios Kyrtzidis2011-11-291-3/+6
| | | | | | clang_findReferencesInFile. llvm-svn: 145455
* Change processor names. Patch by Simon Atanasyan.Akira Hatanaka2011-11-291-4/+4
| | | | llvm-svn: 145453
* Revert r145244. It causes us to create broken ASTs with missing type informationRichard Smith2011-11-299-208/+109
| | | | | | | | | | for some cast expressions. Original commit message: Removed useless ImplicitCast nodes in explicit cstyle and static casts llvm-svn: 145447
* Suppress -Warray-bounds for classes (not just structs) where the last field isMatt Beaumont-Gay2011-11-292-6/+18
| | | | | | a 1-length character array. llvm-svn: 145445
* Eliminate the -emit-module option, which emitted a module by parsing aDouglas Gregor2011-11-2915-33/+23
| | | | | | | source file (e.g., a header). Immediately steal this useful option name for building modules from a module map file. llvm-svn: 145444
* Test isa<FunctionDecl> to exclude objective-C methods. This ensures the ↵Lang Hames2011-11-291-1/+1
| | | | | | following cast will never fail. llvm-svn: 145441
* Escape strings when printing module maps, for silly operating systemsDouglas Gregor2011-11-291-2/+31
| | | | | | that use \ as a separator. llvm-svn: 145439
* Switch on-demand module building over to use module maps, always. WhenDouglas Gregor2011-11-292-94/+78
| | | | | | | we infer the module map, we'll just print the module map to a temporary file and generate the module using that. llvm-svn: 145436
* Relax RegionStore to allow loads from CodeTextRegions. Apparently you can ↵Ted Kremenek2011-11-292-5/+11
| | | | | | actually write code that does this. This seems worthy of a checker, but the StoreManager should handle the memory abstraction without crashing. Fixes PR 11450. llvm-svn: 145424
* Merge branch 'yo-dawg-i-herd-u-like-arrays'Matt Beaumont-Gay2011-11-292-0/+15
| | | | llvm-svn: 145421
* Place "use @dynamic or provide a method implementation" warnings under a -W ↵Ted Kremenek2011-11-293-5/+6
| | | | | | flag. llvm-svn: 145418
* Teach the module import mechanism how to rebuild modules expressed viaDouglas Gregor2011-11-294-13/+83
| | | | | | | module map, rather than assuming that there is an umbrella header. This allows us to automatically build umbrella-less modules. llvm-svn: 145415
* Start refactoring to use module maps when rebuilding a moduleDouglas Gregor2011-11-291-12/+15
| | | | | | on-the-fly. No functionality change. llvm-svn: 145414
* Initialize NumWarningsInPreamble in ASTUnit's constructor, for safety.Argyrios Kyrtzidis2011-11-291-0/+1
| | | | llvm-svn: 145412
* Expose the printing of module maps as part of the ModuleMap::ModuleDouglas Gregor2011-11-292-35/+44
| | | | | | interface. No functionality change. llvm-svn: 145411
* The cheap version of getName() is sufficient here.Benjamin Kramer2011-11-291-1/+1
| | | | llvm-svn: 145399
* Preserve constness.Benjamin Kramer2011-11-291-4/+4
| | | | llvm-svn: 145397
* Silence GCC warnings, RefCountedBase is meant to be default-initialized here.Benjamin Kramer2011-11-292-2/+2
| | | | llvm-svn: 145396
OpenPOWER on IntegriCloud