summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix flags in global block descriptor whenFariborz Jahanian2010-07-281-15/+22
| | | | | | | block returns structs. Fies radar 8241648. Executable test added to llvm test suite. llvm-svn: 109620
* some cleanups and get alignments correct for various coerce cases.Chris Lattner2010-07-281-9/+16
| | | | llvm-svn: 109607
* The grammar for GNU typeof in C requires an expression to beDouglas Gregor2010-07-281-4/+7
| | | | | | | | | | | | | parenthesized, unlike in C++, e.g., C has: typeof ( expression) C++ has: typeof unary-expression So, once we've parsed a parenthesized expression after typeof, we should only go on to parse the postfix expression suffix if we're in C++. Fixes <rdar://problem/8237491>. llvm-svn: 109606
* Preprocessor: Add support for '#pragma clang __debug crash' and '#pragma clangDaniel Dunbar2010-07-281-0/+28
| | | | | | | | __debug overflow_stack'. - For testing crash reporting stuff... you'd think I could just use some C++ code but Doug keeps fixing stuff! llvm-svn: 109587
* Enable expression transformations in the current-instantiationDouglas Gregor2010-07-281-9/+0
| | | | | | | rebuilder, i.e., remove a silly short-sighted hack from long ago. Thanks to Abramo Bagnara for the test case/bug report! llvm-svn: 109583
* When a nested-name-specifier refers into a current instantiation that hasDouglas Gregor2010-07-281-6/+13
| | | | | | | | dependent bases, construct a dependent nested-name-specifier rather than complaining that the name could not be found within the current instantiation itself. Fixes PR7725. llvm-svn: 109582
* we are not supposed to create an improper callsite using a CallInstr; leave ↵Gabor Greif2010-07-281-0/+1
| | | | | | a fixme mentioning the simplification when CallSite can clone itself llvm-svn: 109575
* construct debug info for "id" by hand. Devang Patel2010-07-281-3/+35
| | | | | | Tested by mi1-var-obj.exp in gdb testsuite. llvm-svn: 109571
* When creating a jump destination, its scope should be the scope of theJohn McCall2010-07-282-1/+6
| | | | | | | | | enclosing normal cleanup, not the top of the EH stack. I'm *really* surprised this hasn't been causing more problems. Fixes rdar://problem/8231514. llvm-svn: 109569
* Added some false positive checking to UnreachableCodeCheckerTom Care2010-07-271-31/+92
| | | | | | | | | - Allowed reporting of dead macros - Added path walking function to search for false positives in conditional statements - Updated some affected tests - Added some false positive test cases llvm-svn: 109561
* Extracted out some useful common functions in IdempotentOperationChecker to ↵Tom Care2010-07-273-86/+86
| | | | | | their own CheckerHelpers file. llvm-svn: 109560
* Record macros in dependent PCHs. Also add various info tables to dependent ↵Sebastian Redl2010-07-273-9/+72
| | | | | | PCHs; tests for this to follow. llvm-svn: 109554
* Revert r109546, it broke linux build.Argyrios Kyrtzidis2010-07-272-62/+90
| | | | llvm-svn: 109550
* Merge PCHWriterDecl.cpp's isRequiredDecl and ↵Argyrios Kyrtzidis2010-07-272-90/+62
| | | | | | | | | | | | CodeGenModule::MayDeferGeneration into a new function, DeclIsRequiredFunctionOrFileScopedVar. This function is part of the public CodeGen interface since it's essentially a CodeGen predicate that is also needed by the PCH mechanism to determine whether a decl needs to be deserialized during PCH loading for codegen purposes. This fixes current (and avoids future) codegen-from-PCH bugs. llvm-svn: 109546
* Fix a minor crash bug with constructs like Obj.Class::ENUM_VALUE.Eli Friedman2010-07-271-4/+4
| | | | llvm-svn: 109537
* Always use current working directory for DW_AT_comp_dir.Devang Patel2010-07-272-14/+1
| | | | llvm-svn: 109535
* PR7724: Don't try to evaluate value-dependent expressions.Eli Friedman2010-07-271-1/+1
| | | | llvm-svn: 109532
* Finesse 'idempotent operations' analyzer issues to include the opcode of the ↵Ted Kremenek2010-07-271-10/+16
| | | | | | binary operator for clearer error reporting. Also remove the 'Idempotent operation' prefix in messages; it's redundant since the bug type is the same. llvm-svn: 109527
* Update the list of lexical decls in the TU for chained PCHs. This makes ↵Sebastian Redl2010-07-273-5/+27
| | | | | | -ast-print show the decls from the dependent PCH. llvm-svn: 109524
* Put 'Idempotent operations' static analyzer issues in the 'Dead code' category.Ted Kremenek2010-07-271-1/+2
| | | | llvm-svn: 109517
* Reapply 109303. Devang Patel2010-07-272-14/+40
| | | | llvm-svn: 109507
* Fix use-after-free with precompiled preamblesDouglas Gregor2010-07-271-3/+9
| | | | llvm-svn: 109505
* Always deserialize from PCH file scoped variables with non trivial ↵Argyrios Kyrtzidis2010-07-271-0/+8
| | | | | | | | constructor/destructor. Fixes http://llvm.org/PR7692 llvm-svn: 109501
* Revert r109428 "Hoist argument type checking into CheckFormatHandler. This ↵Michael J. Spencer2010-07-273-62/+42
| | | | | | | | is prep for scanf format" Got errors about ASTContext being undefined with Visual Studio 2010. llvm-svn: 109491
* Don't warn about unreachable code if the block starts with ↵Jordy Rose2010-07-271-1/+16
| | | | | | | | __builtin_unreachable(). The next step is to warn if a block labeled unreachable is, in fact, reachable. Somewhat related to PR810. llvm-svn: 109487
* Add PTHLexer::LexEndOfFile() to emit diagnostics at end-of-file similar to ↵Ted Kremenek2010-07-271-4/+25
| | | | | | those by Lexer::LexEndOfFile(). llvm-svn: 109486
* PTH generation: Don't save the leading '#' token in a null directive. This ↵Ted Kremenek2010-07-271-4/+9
| | | | | | unbreaks using PTH with Boost (<rdar://problem/8227989>). llvm-svn: 109484
* Groundwork for C string length tracking. Currently only handles the length ↵Jordy Rose2010-07-271-2/+189
| | | | | | of constant string literals, which is not too helpful, and only calls to strlen() are checked. llvm-svn: 109480
* Implement -fno-validate-pch at the -cc1 level, which suppresses mostDouglas Gregor2010-07-275-18/+33
| | | | | | | | | | | | | | | of the usual consistency checks used to determine when a precompiled header is incompatible with the translation unit it's being loaded into. Enable this option when loading a precompiled preamble, because the preamble loader will be performing all of this checking itself. Enable the preamble-based test now that it's working. This option is also useful for debugging Clang's PCH (<rdar://problem/7532213>). llvm-svn: 109475
* - Fix recording of offsets of types in dependent PCHs.Sebastian Redl2010-07-275-43/+76
| | | | | | | - Stop reading in (and thus deserializing) every declaration in the TU when creating a dependent PCH. - Switch the storage of a decl context's lexical declarations to a blob containing the IDs instead of a record. This is the only sane way of supporting update records later on. llvm-svn: 109474
* When remapping a virtual file, also make an entry for the file withDouglas Gregor2010-07-261-0/+12
| | | | | | | its absolute path on disk. Also, introduce a fun test for the precompiled preamble, which almost works... llvm-svn: 109470
* 2nd argument of __builtin_expect must be evaluatedFariborz Jahanian2010-07-261-1/+4
| | | | | | | if it hs side-effect to matchgcc's behaviour. Addresses radar 8172109. llvm-svn: 109467
* Test for the presence of EH branch-throughs instead of normal branch-throughs.John McCall2010-07-261-1/+1
| | | | | | I knew this code duplication would bite me. llvm-svn: 109463
* Introduce basic support for loading a precompiled preamble whileDouglas Gregor2010-07-267-33/+117
| | | | | | | | | | | | | | | | | | | | | | | reparsing an ASTUnit. When saving a preamble, create a buffer larger than the actual file we're working with but fill everything from the end of the preamble to the end of the file with spaces (so the lexer will quickly skip them). When we load the file, create a buffer of the same size, filling it with the file and then spaces. Then, instruct the lexer to start lexing after the preamble, therefore continuing the parse from the spot where the preamble left off. It's now possible to perform a simple preamble build + parse (+ reparse) with ASTUnit. However, one has to disable a bunch of checking in the PCH reader to do so. That part isn't committed; it will likely be handled with some other kind of flag (e.g., -fno-validate-pch). As part of this, fix some issues with null termination of the memory buffers created for the preamble; we were trying to explicitly NULL-terminate them, even though they were also getting implicitly NULL terminated, leading to excess warnings about NULL characters in source files. llvm-svn: 109445
* Minor code simplification.Dan Gohman2010-07-261-2/+1
| | | | llvm-svn: 109443
* It's not necessary to call flush() on a raw_ostream immediately priorDan Gohman2010-07-262-2/+0
| | | | | | to deleting it. llvm-svn: 109441
* Fix namespace polution.Dan Gohman2010-07-269-3/+28
| | | | llvm-svn: 109440
* Hoist argument type checking into CheckFormatHandler. This is prep for ↵Ted Kremenek2010-07-263-42/+62
| | | | | | | | scanf format string argument type checking. llvm-svn: 109428
* Consolidate #args checking for scanf/printf format strings.Ted Kremenek2010-07-261-30/+31
| | | | llvm-svn: 109427
* Revert 109303.Devang Patel2010-07-262-40/+14
| | | | llvm-svn: 109426
* Make sure that implicit qualification and derived-to-base conversions of ↵Sebastian Redl2010-07-261-4/+8
| | | | | | xvalues preserve xvalue-ness. Unfortunately I have no idea how to test this property; there doesn't seem to be a syntactical construct that triggers such a conversion and still allows the distinction between prvalues and xvalues to be made. llvm-svn: 109406
* Add source location information to C++ base specifiers.Nick Lewycky2010-07-2610-44/+50
| | | | llvm-svn: 109396
* Eliminate the "minimal" and printing parser actions, which only everDouglas Gregor2010-07-267-1163/+105
| | | | | | | worked for C anyway. Also kills the -cc1 options -parse-noop and -parse-print-callbacks. llvm-svn: 109392
* Wrap bit mangling logic for DiagMappings in its own class so it doesn't leakBenjamin Kramer2010-07-251-5/+2
| | | | | | into other code. Make it an array instead of a constant-length vector. llvm-svn: 109384
* Remove a bunch of trivial destructorsDouglas Gregor2010-07-251-2/+0
| | | | llvm-svn: 109382
* Move Type destructor out-of-lineDouglas Gregor2010-07-251-0/+2
| | | | llvm-svn: 109381
* Remove destructors from declaration nodesDouglas Gregor2010-07-254-35/+1
| | | | llvm-svn: 109380
* I lied. Kill off a few more Destroy methodsDouglas Gregor2010-07-252-25/+1
| | | | llvm-svn: 109379
* Kill off the last Destroy method in the AST libraryDouglas Gregor2010-07-252-11/+0
| | | | llvm-svn: 109378
* Remove the vast majority of the Destroy methods from the AST library,Douglas Gregor2010-07-2527-621/+17
| | | | | | since we aren't going to be calling them ever. llvm-svn: 109377
OpenPOWER on IntegriCloud