summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Restore r147493 and remove the part of the test that was checking the wrong ↵David Chisnall2012-01-041-6/+32
| | | | | | thing. llvm-svn: 147530
* Extend ConditionBRVisitor to handle condition variable assignments.Ted Kremenek2012-01-041-4/+39
| | | | llvm-svn: 147526
* Don't treat 'import' as a contextual keyword when we're in a caching lexer, ↵Douglas Gregor2012-01-042-11/+20
| | | | | | or when modules are disabled. llvm-svn: 147524
* Process attributes in explicit function template instantiations. Fixes part ofRafael Espindola2012-01-041-0/+3
| | | | | | PR11690. llvm-svn: 147523
* Add an explicit LambdaExprContext to Declarator, to parallel ↵Eli Friedman2012-01-043-5/+16
| | | | | | BlockLiteralContext. Use it to ensure semantic analysis of types isn't confused by the lack of a type specifier. llvm-svn: 147522
* Have functions return structures smaller than 128-bit in registers if ABIAkira Hatanaka2012-01-041-3/+54
| | | | | | is either N32 or N64. llvm-svn: 147520
* Fix messed-up indentation in r147515.Eli Friedman2012-01-041-7/+7
| | | | llvm-svn: 147517
* Stub out the Sema interface for lambda expressions, and change the parser to ↵Eli Friedman2012-01-043-18/+83
| | | | | | use it. Unconditionally error on lambda expressions because they don't work in any meaningful way yet. llvm-svn: 147515
* Revert r147493. It broke test/CodeGenObjC/constant-strings.m.Rafael Espindola2012-01-041-32/+6
| | | | llvm-svn: 147511
* Teach the static analyzer to not treat XPC types as CF types.Ted Kremenek2012-01-041-1/+3
| | | | llvm-svn: 147506
* Minor code formatting cleanups.Ted Kremenek2012-01-041-17/+17
| | | | llvm-svn: 147505
* In non-gc, non-arc mode, property of 'Class' typeFariborz Jahanian2012-01-041-0/+9
| | | | | | | | variety is treated as a 'void *'. No need to issue warning reserved for objc object properties. // rdar://10565506 llvm-svn: 147504
* Get rid of an unnecessary check; the AST for init-lists is the same ↵Eli Friedman2012-01-031-6/+4
| | | | | | independent of whether we're in C++11 mode. llvm-svn: 147503
* Enhance UnixAPIChecker to also warn about zero-sized allocations to calloc() ↵Ted Kremenek2012-01-031-25/+113
| | | | | | and realloc(). Patch by Cyril Roelandt! llvm-svn: 147500
* Minor tweak to name lookup for C/Objective-C: after the first name, still ↵Douglas Gregor2012-01-031-1/+1
| | | | | | consider whether this is a redeclaration lookup when determining whether to look for the visible declaration llvm-svn: 147499
* Test "merging" of typedef types across distinct modules. At present,Douglas Gregor2012-01-033-23/+28
| | | | | | | | | | | | the AST reader doesn't actually perform a merge, because name lookup knows how to merge identical typedefs together. As part of this, teach C/Objective-C name lookup to return multiple results in all cases, rather than first digging through the attributes to see if the value is overloadable. This way, we'll catch ambiguous lookups in C/Objective-C. llvm-svn: 147498
* Support constant evaluation for OpenCL nested vector literals. Patch by ↵Eli Friedman2012-01-031-43/+32
| | | | | | Anton Lokhmotov. llvm-svn: 147496
* Add initial version of checker to check if virtual member functions are ↵Ted Kremenek2012-01-033-0/+243
| | | | | | | | called transitively from C++ constructors or destructors. Checker by Lei Zhang with a few tweaks by Ted Kremenek. llvm-svn: 147494
* Initialise constant Objective-C string isa pointers with a weak reference to ↵David Chisnall2012-01-031-6/+32
| | | | | | the class, so that they are usable in +load methods if the string class has been compiled with clang - if it's been compiled with GCC, the ABI makes this impossible. (GNU runtimes) llvm-svn: 147493
* objc: diagnose misplacement of objc_suppress_autosynthesisFariborz Jahanian2012-01-031-0/+5
| | | | | | attribute. llvm-svn: 147490
* Fixed by Chandler in r147434.Chad Rosier2012-01-031-1/+0
| | | | llvm-svn: 147489
* Implement cross-module declaration merging for tag declarations, soDouglas Gregor2012-01-031-2/+38
| | | | | | | | | | | | that if two modules A and B both contain a declaration of a tag such as struct X; and those two modules are unrelated, the two declarations of X will be merged into a single redeclaration chain. llvm-svn: 147488
* Add __has_feature(objc_modules)Douglas Gregor2012-01-031-0/+1
| | | | llvm-svn: 147482
* Re-uglify #public and #private to #__public_macro and #__private_macro.Douglas Gregor2012-01-032-8/+10
| | | | llvm-svn: 147469
* objc: use objc_suppress_autosynthesis attribute on classesFariborz Jahanian2012-01-032-5/+8
| | | | | | which should not be default synthesized. llvm-svn: 147468
* Eliminate the uglified keyword __import_module__ for importingDouglas Gregor2012-01-034-19/+11
| | | | | | | | | | | | | modules. This leaves us without an explicit syntax for importing modules in C/C++, because such a syntax needs to be discussed first. In Objective-C/Objective-C++, the @import syntax is used to import modules. Note that, under -fmodules, C/C++ programs can import modules via the #include mechanism when a module map is in place for that header. This allows us to work with modules in C/C++ without committing to a syntax. llvm-svn: 147467
* Don't depend on undefined macros being 0, there are options for theJoerg Sonnenberger2012-01-031-1/+2
| | | | | | preprocessor to warn about it. llvm-svn: 147466
* objc: introduce objc_suppress_autosynthesis class Fariborz Jahanian2012-01-032-0/+16
| | | | | | attributes for later use. llvm-svn: 147457
* Under -fmodules, accept #public <macroname> and #private <macroname>Douglas Gregor2012-01-033-16/+24
| | | | | | | to make a macro public (the default for headers) or private, respectively. llvm-svn: 147455
* Introduce a non-uglified syntax for module imports in Objective-C:Douglas Gregor2012-01-036-21/+32
| | | | | | @import identifier [. identifier]* ; llvm-svn: 147452
* Don't attempt to merge a deserialized declaration with existingDouglas Gregor2012-01-031-0/+4
| | | | | | | declarations in the AST unless modules are enabled. This case doesn't come up with precompiled headers, and it isn't cheap. llvm-svn: 147451
* Factor the merging of declarations in the AST reader out to a separateDouglas Gregor2012-01-031-78/+48
| | | | | | | | member function template, since the behavior is identical for ObjCInterfaceDecl and ObjCProtocolDecl. It's expected that all redeclarable entities will have the same behavior. llvm-svn: 147450
* Add -fno-modules to the driver, to turn off modules (although they're off by ↵Douglas Gregor2012-01-031-2/+3
| | | | | | default anyway). llvm-svn: 147449
* Add a "Modules" language option, which subsumes the previousDouglas Gregor2012-01-034-8/+5
| | | | | | "AutoModuleImport" preprocessor option and is tied to -fmodules. llvm-svn: 147448
* Rename the command-line option for mapping #include/#import over toDouglas Gregor2012-01-032-2/+2
| | | | | | | | module imports from -fauto-module-import to -fmodules. The new name will eventually be used to enable modules, and the #include/#import mapping is a crucial part of the feature. llvm-svn: 147447
* Process attributes in explicit template instatiation definitions. Fixes PR11690.Rafael Espindola2012-01-031-0/+3
| | | | llvm-svn: 147441
* Teach the frontend to provide the builtin preprocessor defines forChandler Carruth2012-01-031-0/+3
| | | | | | -ffast-math. llvm-svn: 147440
* Add assertion to char32_t that the value is valid, as suggested by Jordy Rose.Richard Smith2012-01-021-1/+1
| | | | | | | Add a test that such characters don't make it through to StringLiteral objects in error recovery. llvm-svn: 147438
* Diagnose cases where the definition of a particular type is required,Douglas Gregor2012-01-023-12/+52
| | | | | | | is known (to Clang), but is not visible because the module has not yet been imported. llvm-svn: 147436
* Fix PR11685 by implementing -ffast-math and its various friends in theChandler Carruth2012-01-023-19/+108
| | | | | | | | | | | | | | | | | | | | | | | | | Clang driver. This involves a bunch of silly option parsing code to try to carefully emulate GCC's options. Currently, this takes a conservative approach, and unless all of the unsafe optimizations are enabled, none of them are. The fine grained control doesn't seem particularly useful. If it ever becomes useful, we can add that to LLVM first, and then expose it here. This also fixes a few tiny bugs in the flag management around -fhonor-infinities and -fhonor-nans; the flags now form proper sets both for enabling and disabling, with the last flag winning. I've also implemented a moderately terrifying GCC feature where a language change is also provided by the '-ffast-math' flag by defining the __FAST_MATH__ preprocessor macro. This feature is tracked and serialized in the frontend but it isn't used yet. A subsequent patch will add the preprocessor macro and tests for it. I've manually tested that codegen appears to respect this, but I've not dug in enough to see if there is an easy way to test codegen options w/o relying on the particulars of LLVM's optimizations. llvm-svn: 147434
* Added a missing case for -Wdisabled-macro-expansion.Abramo Bagnara2012-01-021-1/+3
| | | | llvm-svn: 147433
* Small cosmetic cleanups in code I will change anyway.Rafael Espindola2012-01-021-4/+4
| | | | llvm-svn: 147424
* Eliminate ObjCProtocolDecl's end-of-definition location. It is notDouglas Gregor2012-01-023-4/+0
| | | | | | used anywhere. llvm-svn: 147422
* Fix canonicalization of protocol-qualified typesDouglas Gregor2012-01-022-2/+14
| | | | llvm-svn: 147421
* Move ObjCProtocolDecl::EndLoc into its DefinitionData, and giveDouglas Gregor2012-01-023-3/+4
| | | | | | ObjCProtocolDecl proper source-range information. llvm-svn: 147420
* Eliminate the ForwardDecl/InitiallyForwardDecl bits from ObjCProtocolDecl. ↵Douglas Gregor2012-01-015-22/+9
| | | | | | They are no longer needed llvm-svn: 147419
* Added -Wdisabled-macro-expansion warning.Abramo Bagnara2012-01-011-2/+5
| | | | llvm-svn: 147418
* Implement declaration merging for Objective-C protocols acrossDouglas Gregor2012-01-011-3/+45
| | | | | | | multiple, disjoint modules. There is far too much duplicating with the ObjCInterfaceDecl case here, which I'll eliminate shortly. llvm-svn: 147417
* Eliminate redundant, empty functionDouglas Gregor2012-01-011-2/+0
| | | | llvm-svn: 147416
* Eliminate ObjCForwardProtocolDecl, which is redundant now thatDouglas Gregor2012-01-0119-204/+90
| | | | | | ObjCProtocolDecl modules forward declarations properly. llvm-svn: 147415
OpenPOWER on IntegriCloud