summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Objective-C: check that when a category method is being implemented,Fariborz Jahanian2012-10-231-8/+20
| | | | | | | method type in cateogry matches the implementation. // rdar://12519216 llvm-svn: 166518
* Make DiagnosticOptions intrusively reference-counted, and make sureDouglas Gregor2012-10-2319-104/+121
| | | | | | | the various stakeholders bump up the reference count. In particular, the diagnostics engine now keeps the DiagnosticOptions object alive. llvm-svn: 166508
* Fix pretty-printing pseudo-destructor calls. Patch by Grzegorz Jablonski.Eli Friedman2012-10-231-0/+1
| | | | llvm-svn: 166500
* Add a new warning -Wmissing-variable-declarations, to warn about variablesEli Friedman2012-10-232-0/+13
| | | | | | | | | defined without a previous declaration. This is similar to -Wmissing-prototypes, but for variables instead of functions. Patch by Ed Schouten. llvm-svn: 166498
* Switch CodeGenOptions over to a .def file, like we do with LangOptions.Douglas Gregor2012-10-2310-43/+52
| | | | llvm-svn: 166497
* When rebuilding a DependentScopeDeclRefExpr, perform a lookup into the scopeRichard Smith2012-10-231-2/+6
| | | | | | even if it's dependent, in case it now names a member of the current instantiation. llvm-svn: 166496
* [ms-inline asm] Update for r166433.Chad Rosier2012-10-231-3/+8
| | | | llvm-svn: 166489
* Handle -pthread, -pg and -shared correctly on bitrig.Rafael Espindola2012-10-231-2/+8
| | | | | | Patch by David Hill. llvm-svn: 166483
* If the precompiled header named by "-include" is actually a directory,Douglas Gregor2012-10-233-93/+280
| | | | | | | | | check each of the files within that directory to determine if any of them is an AST file that matches the language and target options. If so, the first matching AST file is loaded. This fixes a longstanding discrepency with GCC's precompiled header implementation. llvm-svn: 166469
* Fix -Wunused-value to not warn on expressions that have unresolved lookups dueMatt Beaumont-Gay2012-10-231-0/+5
| | | | | | to dependent arguments. llvm-svn: 166468
* [ms-inline-asm] Add handling for errors coming out of the backend.Eli Friedman2012-10-231-5/+46
| | | | llvm-svn: 166463
* Don't try to use inreg with 0 sized structs. Thanks to Eli for reporting theRafael Espindola2012-10-231-0/+4
| | | | | | regression. llvm-svn: 166461
* Ugly ugly hack for libstdc++-4.6 and libstdc++-4.7 compatibility. TheseRichard Smith2012-10-231-0/+16
| | | | | | | | | | | | | | | | | libraries have an incorrect definition of std::common_type (inherited from a bug in the standard -- see LWG issue 2141), whereby they produce reference types when they should not. If we instantiate a typedef named std::common_type<...>::type, which is defined in a system header as decltype(... ? ... : ...), and the decltype produces a reference type, convert it to the non-reference type. (This doesn't affect any LWG2141-conforming implementation of common_type, such as libc++'s, because the default implementation of common_type<...>::type isn't supposed to produce a reference type.) This is horrible. I'm really sorry. :( Better ideas appreciated! llvm-svn: 166455
* Handle implicitly-included PCH files the same way asDouglas Gregor2012-10-222-10/+17
| | | | | | | | implicitly-included PTH files during initialization, delaying the mapping down to the "original source file" until after later in the initialization process. llvm-svn: 166452
* Allow clients of the AST reader to specify what kinds of AST loadDouglas Gregor2012-10-224-69/+122
| | | | | | | | | | failures they know how to tolerate, e.g., out-of-date input files or configuration/version mismatches. Suppress the corresponding diagnostics if the client can handle it. No clients actually use this functionality, yet. llvm-svn: 166449
* Collapse ASTReader::ReadSLocEntryRecord() into its only caller,Douglas Gregor2012-10-221-8/+3
| | | | | | ReadSLocEntry(). No functionality change. llvm-svn: 166447
* Distinguish the various kinds of AST file loading failures:Douglas Gregor2012-10-224-116/+106
| | | | | | | | file corruption, compiler version mismatch, target/language configuration mismatch, out-of-date AST file. No functionality change yet. llvm-svn: 166446
* [Options] Add prefixes to options.Michael J. Spencer2012-10-229-53/+137
| | | | | | | | | | | | | | Each option has a set of prefixes. When matching an argument such as -funroll-loops. First the leading - is removed as it is a prefix. Then a lower_bound search for "funroll-loops" is done against the option table by option name. From there each option prefix + option name combination is tested against the argument. This allows us to support Microsoft style options where both / and - are valid prefixes. It also simplifies the cases we already have where options come in both - and -- forms. Almost every option for gnu-ld happens to have this form. llvm-svn: 166444
* ASTReader.cpp: Fix a warning. [-Wunused-variable]NAKAMURA Takumi2012-10-221-0/+1
| | | | llvm-svn: 166442
* Fix for PR13334. This prevents crashes that result from badly formedRichard Trieu2012-10-221-12/+27
| | | | | | expressions involving __has_include llvm-svn: 166438
* Fix pre-commit refacto failure.Daniel Dunbar2012-10-221-1/+1
| | | | llvm-svn: 166431
* driver/Darwin: Follow up to last patch, M-class CPUs are AAPCS but not EABI.Daniel Dunbar2012-10-221-1/+3
| | | | llvm-svn: 166430
* Eliminate the redundancy between source-file information in the sourceDouglas Gregor2012-10-222-201/+174
| | | | | | | | | | manager block and input-file information in the control block. The source manager entries now point back into the control block. Input files are now lazily deserialized (if validation is disabled). Reduces Cocoa's PCH by the ~70k I added when I introduced the redundancy in r166251. llvm-svn: 166429
* driver/Darwin: Default to AAPCS for M-class CPUs.Daniel Dunbar2012-10-221-1/+10
| | | | | | | - This is an assumption that is currently hardwired into the backend, we need to do this in order for the frontend and backend to agree. llvm-svn: 166428
* Implement hasParent()-matcher.Daniel Jasper2012-10-221-3/+6
| | | | llvm-svn: 166421
* PR14141 (part of DR1351): An implicitly-deduced "any" exception specificationRichard Smith2012-10-211-0/+10
| | | | | | | produces an exception of 'noexcept(false)' and is thus compatible with an explicit exception specification of 'noexcept(false)'. llvm-svn: 166404
* Silence warning about && in ||.Benjamin Kramer2012-10-211-1/+1
| | | | llvm-svn: 166391
* Add support of MIPS n32 ABI to the Clang driver. The fix builds correct ↵Simon Atanasyan2012-10-213-16/+54
| | | | | | | | library/object files paths and passes appropriate command line options to the linker if user provides -mabi=n32 option. The patch reviewed by Rafael Espindola. llvm-svn: 166389
* Unrevert r166268, reverted in r166272, with a fix for the issue which NickRichard Smith2012-10-212-8/+50
| | | | | | | | | | | | | | | | | | | | | found: if an overloaded operator& is present before a template definition, the expression &T::foo is represented as a CXXOperatorCallExpr, not as a UnaryOperator, so we didn't notice that it's permitted to reference a non-static data member of an unrelated class. While investigating this, I discovered another problem in this area: we are treating template default arguments as unevaluated contexts during substitution, resulting in performing incorrect checks for uses of non-static data members in C++11. That is not fixed by this patch (I'll look into this soon; it's related to the failure to correctly instantiate constexpr function templates), but was resulting in this bug not firing in C++11 mode (except with -Wc++98-compat). Original message: PR14124: When performing template instantiation of a qualified-id outside of a class, diagnose if the qualified-id instantiates to a non-static class member. llvm-svn: 166385
* When used in a compound expression FP_CONTRACT should proceed all explicitLang Hames2012-10-211-3/+8
| | | | | | | declarations and statements. Emit an error if the FP_CONTRACT is used later in a compound statement. llvm-svn: 166383
* Move private classes into anonymous namespaces.Benjamin Kramer2012-10-202-0/+12
| | | | llvm-svn: 166377
* DR1473: Do not require a space between operator"" and the ud-suffix in aRichard Smith2012-10-201-5/+10
| | | | | | literal-operator-id. llvm-svn: 166373
* Rework implementation of DR1492: Apply the resolution to operator delete too,Richard Smith2012-10-204-35/+52
| | | | | | | | | | | | since it also has an implicit exception specification. Downgrade the error to an extwarn, since at least for operator delete, system headers like to declare it as 'noexcept' whereas the implicit definition does not have an explicit exception specification. Move the exception specification for user-declared 'operator delete' functions from the type-as-written into the type, to reflect reality and to allow us to detect whether there was an implicit exception spec or not. llvm-svn: 166372
* Fix __builtin_va_arg assertion failure in ARM AAPCS.Logan Chien2012-10-201-0/+10
| | | | llvm-svn: 166369
* [analyzer] Assume 'new' never returns NULL if it could throw an exception.Jordan Rose2012-10-201-1/+12
| | | | | | | | | | | | | | | | | | | This is actually required by the C++ standard in [basic.stc.dynamic.allocation]p3: If an allocation function declared with a non-throwing exception-specification fails to allocate storage, it shall return a null pointer. Any other allocation function that fails to allocate storage shall indicate failure only by throwing an exception of a type that would match a handler of type std::bad_alloc. We don't bother checking for the specific exception type, but just go off the operator new prototype. This should help with a certain class of lazy initalization false positives. <rdar://problem/12115221> llvm-svn: 166363
* DR1472: A reference isn't odr-used if it has preceding initialization,Richard Smith2012-10-202-12/+27
| | | | | | | | | initialized by a reference constant expression. Our odr-use modeling still needs work here: we don't yet implement the 'set of potential results of an expression' DR. llvm-svn: 166361
* When associating file ranges of macro arguments with theirArgyrios Kyrtzidis2012-10-201-37/+82
| | | | | | | | | | macro expansion ranges, make sure to check all the FileID entries that are contained in the spelling range of the expansion for the macro argument. Fixes rdar://12537982 llvm-svn: 166359
* [Options] Make Option non clang specific.Michael J. Spencer2012-10-194-8/+14
| | | | llvm-svn: 166348
* [Options] make Option a value type.Michael J. Spencer2012-10-195-54/+58
| | | | llvm-svn: 166347
* Pretty-print a ParenListExpr in a variable initializer correctly. Patch by ↵Eli Friedman2012-10-191-2/+2
| | | | | | Grzegorz Jablonski. llvm-svn: 166311
* [ms-inline asm] Set the SemaCallback in the TargetAsmParser.Chad Rosier2012-10-191-1/+3
| | | | llvm-svn: 166310
* IRgen: Initialize TargetLoweringInfo with a triple.Daniel Dunbar2012-10-191-1/+2
| | | | | | | | - We create two TargetLoweringInfo instances for different pass managers, and they weren't consistent (the one for codegen didn't have the right info). I'm not sure this mattered anywhere in practice. llvm-svn: 166299
* Clarify wording of -Wshift-op-parentheses.David Blaikie2012-10-191-5/+5
| | | | | | Suggestion from Matt Beaumont-Gay reviewing r165283. llvm-svn: 166296
* [ms-inline asm] Set the MCTargetAsmParser as paring MS-style inline asm.Chad Rosier2012-10-191-0/+1
| | | | llvm-svn: 166293
* Remove const_casts by propagating constness down to called functions.Dmitri Gribenko2012-10-192-5/+5
| | | | llvm-svn: 166287
* Allow objc_requires_super to be used to check class methods as well.Jordan Rose2012-10-193-35/+22
| | | | | | | | | | | | | Also, unify ObjCShouldCallSuperDealloc and ObjCShouldCallSuperFinalize. The two have identical behavior and will never be active at the same time. There's one last simplification now, which is that if we see a call to [super foo] and we are currently in a method named 'foo', we will /unconditionally/ clear the ObjCShouldCallSuper flag, rather than check first to see if we're in a method where calling super is required. There's no reason to pay the extra lookup price here. llvm-svn: 166285
* Change VerifyDiagnosticConsumer so that it *must* contain at least one ↵Andy Gibbs2012-10-191-6/+31
| | | | | | | | | | "expected-*" directive. As a result, for test-cases that are not expected to generate any diagnostics, an additional directive "expected-no-diagnostics" has been implemented which can then be included in such test-cases. This new directive may not be used in conjunction with any other "expected-*" directive. This change was initially proposed as a solution to the problem highlighted by check-in r164677, i.e. that -verify will not cause a test-case failure where the compile command does not actually reference the file. Patch reviewed by David Blaikie. llvm-svn: 166281
* Fix directive parsing in VerifyDiagnosticConsumer so that it ensures that ↵Andy Gibbs2012-10-191-5/+17
| | | | | | | | "expected" is at the start of the word and will no longer accept typos such as "junkexpected-*" as a valid "expected-*" directive. A very few test-cases had to be amended to adhere to the new rule. Patch reviewed by David Blaikie. llvm-svn: 166279
* Revert r166268, this fix for a crash-on-invalid introduced a rejects-valid.Nick Lewycky2012-10-192-38/+7
| | | | | | Richard has an unreduced testcase to work with. llvm-svn: 166272
* DR1511: A const volatile global does not implicitly get internal linkage like aRichard Smith2012-10-191-5/+5
| | | | | | const non-volatile global does. llvm-svn: 166269
OpenPOWER on IntegriCloud