summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* PR14124: When performing template instantiation of a qualified-id outside of aRichard Smith2012-10-192-7/+38
| | | | | | class, diagnose if the qualified-id instantiates to a non-static class member. llvm-svn: 166268
* Fix handling of the regparm attribute in the presence of classes with copyRafael Espindola2012-10-193-42/+48
| | | | | | | | | | | | | constructors. When I first moved regparm support to TargetInfo.cpp I tried to isolate it in classifyArgumentTypeWithReg, but it is actually a lot easier to flip the code around and check for regparm at the end of the decision tree. Without this refactoring classifyArgumentTypeWithReg would have to duplicate the logic about when to use non-byval indirect arguments. llvm-svn: 166266
* Teach getColumnNumber to use the line cache to get the start of the line if ↵Craig Topper2012-10-191-0/+11
| | | | | | its on the same line as the last call to getLineNumber. Prevents needing to scan backwards for the new line. Fixes PR14106. llvm-svn: 166265
* Reintroduce the TargetTransformInfo to the clang pass manager.Nadav Rotem2012-10-191-1/+5
| | | | llvm-svn: 166263
* ASTWriter.cpp: Fix a warning. [-Wunused-variable]NAKAMURA Takumi2012-10-191-2/+1
| | | | llvm-svn: 166257
* Handle diamond inheritance in -Woverloaded-virtual.David Blaikie2012-10-191-13/+29
| | | | llvm-svn: 166254
* Describe the new input-files block and its record, for llvm-bcanalyzer.Douglas Gregor2012-10-191-0/+3
| | | | llvm-svn: 166252
* Move the set of files to be validated in an AST file into the controlDouglas Gregor2012-10-193-126/+190
| | | | | | | | | | | | | block, so the input files are validated early on, before we've committed to loading the AST file. This (accidentally) fixed a but wherein the main file used to generate the AST file would *not* be validated by the existing validation logic. At the moment, this leads to some duplication of filenames between the source manager block and input-file blocks, as well as validation logic. This will be handled via an upcoming patch. llvm-svn: 166251
* Revert r166223 and the subsequent commits that depend on it, r166230 & r166235.Argyrios Kyrtzidis2012-10-188-64/+61
| | | | | | This seems to have introduced assertion hit when building compiler-rt. llvm-svn: 166245
* Fix up comment and invert order. Most simple check first.Eric Christopher2012-10-181-4/+6
| | | | llvm-svn: 166240
* Use the type as written when pretty-printing C-style casts. Patch by ↵Eli Friedman2012-10-181-1/+1
| | | | | | Grzegorz Jablonski. llvm-svn: 166237
* Add a new option for and disable column number information as thereEric Christopher2012-10-183-0/+7
| | | | | | | | | | are no known current users of column info. Robustify and fix up a few tests in the process. Reduces the size of debug information by a small amount. Part of PR14106 llvm-svn: 166236
* Move OriginalDir from ASTReader to ModuleFile.Douglas Gregor2012-10-181-18/+13
| | | | llvm-svn: 166233
* [doc parsing] use getParamName to access parameter Fariborz Jahanian2012-10-183-18/+23
| | | | | | | for current(rewritten) comment and getParamNameAsWritten to access param name coming with \param marker. llvm-svn: 166231
* [Options] Make Option non clang specific.Michael J. Spencer2012-10-184-8/+14
| | | | llvm-svn: 166230
* Move the "RelocatablePCH" bit from the ASTReader to the module file.Douglas Gregor2012-10-181-9/+9
| | | | llvm-svn: 166229
* Move information about the "original file" from the ASTReader into theDouglas Gregor2012-10-181-17/+21
| | | | | | module files. llvm-svn: 166228
* Remove check which incorrectly suppressed printing an identifier in type ↵Eli Friedman2012-10-181-3/+0
| | | | | | printing. Patch by Benoit Perrot. llvm-svn: 166227
* Fix AST pretty-printing for C++ new expressions with placement arguments ↵Eli Friedman2012-10-181-1/+3
| | | | | | | | with default values. Based on patch by Grzegorz Jablonski. llvm-svn: 166226
* [Options] make Option a value type.Michael J. Spencer2012-10-185-53/+50
| | | | llvm-svn: 166223
* [ms-inline asm] Add a size argument to the LookupInlineAsmIdentifier() callback,Chad Rosier2012-10-181-3/+8
| | | | | | which will be used by the asm matcher in the near future. llvm-svn: 166221
* Fix Objective-C implicit property synthesis for C++ classes so we use valid Eli Friedman2012-10-182-40/+23
| | | | | | | | | | | source locations in places where it is necessary for diagnostics. By itself, this causes assertions, so while I'm here, also fix property synthesis for properties of C++ class type so we use so we properly set up a scope and mark variable declarations. <rdar://problem/12514189>. llvm-svn: 166219
* Emit diagnostics in chunks even when we're trying to print colored template ↵Benjamin Kramer2012-10-181-12/+15
| | | | | | | | diffs. char-by-char is really slow on an unbuffered stream. llvm-svn: 166218
* [ms-inline asm] Have the LookupInlineAsmIdentifier() callback function return aChad Rosier2012-10-181-19/+17
| | | | | | | *NamedDecl. In turn, build the expressions after we're finished parsing the asm. This avoids a crasher if the lookup fails. llvm-svn: 166213
* [analyzer] Ivar invalidation: identify properties declared in protocols.Anna Zaks2012-10-181-5/+9
| | | | llvm-svn: 166211
* Factor CollectClassPropertyImplementations out of Sema into ASTAnna Zaks2012-10-182-42/+38
| | | | | | This would make it possible for the analyzer to use the function. llvm-svn: 166210
* From Vassil Vassilev: enable Sema to deal with multiple ExternalSemaSources.Axel Naumann2012-10-187-8/+307
| | | | llvm-svn: 166208
* Collapse the original file name and original file ID records into aDouglas Gregor2012-10-182-19/+9
| | | | | | single record. llvm-svn: 166206
* Collapse the "version control revision/tag" AST file record into theDouglas Gregor2012-10-182-33/+35
| | | | | | | metadata record, which already had other version information. Clean up the block info block along the way. llvm-svn: 166204
* Split the target options out into their own record within the ASTDouglas Gregor2012-10-182-31/+39
| | | | | | file's control block. llvm-svn: 166195
* DR1442: In a range-based for statement, namespace 'std' is not an associatedRichard Smith2012-10-185-22/+7
| | | | | | namespace. llvm-svn: 166194
* PR14021: Copy lookup results to ensure safe iteration.David Blaikie2012-10-181-2/+8
| | | | | | | | | | | | | | | | | Within the body of the loop the underlying map may be modified via Sema::AddOverloadCandidate -> Sema::CompareReferenceRelationship -> Sema::RequireCompleteType to avoid the use of invalid iterators the sequence is copied first. A reliable, though large, test case is available - it will be reduced and committed shortly. Patch by Robert Muth. Review by myself, Nico Weber, and Rafael Espindola. llvm-svn: 166188
* [ms-inline asm] Move most of the AsmParsing logic in clang back into the MCChad Rosier2012-10-181-180/+81
| | | | | | | layer. Use the new ParseMSInlineAsm() API and add an implementation of the MCAsmParserSemaCallback interface. llvm-svn: 166184
* Fixed some corner cases due to implicit int TypeLoc and simplified the logic.Abramo Bagnara2012-10-181-11/+22
| | | | llvm-svn: 166174
* Put used="1" on all used declarations in the XML dumper. This allows us toNick Lewycky2012-10-181-1/+3
| | | | | | start seeing the bit so that we can find bugs and write tests for it. llvm-svn: 166171
* Start factoring the on-disk records for an AST file into a controlDouglas Gregor2012-10-182-155/+230
| | | | | | | | | | | | | | | | | block, which stores information about how the AST file to generated, from the AST block, which stores the actual serialized AST. The information in the control block should be enough to determine whether the AST file is up-to-date and compatible with the current translation unit, and reading it should not cause any side effects that aren't easy to undo. That way, we can back out from an attempt to read an incompatible or out-of-date AST file. Note that there is still more factoring to do. In particular, information about the source files used to generate the AST file (along with their time stamps, sizes, etc.) still resides in the source manager block. llvm-svn: 166166
* Revert svn r165741 "Add TargetTransformInfo to the clang driver."Bob Wilson2012-10-181-5/+1
| | | | | | | Nadav's llvm change r165665 caused problems with an LTO bootstrap of clang, so I'm reverting it for now, along with follow-on patches like this one. llvm-svn: 166164
* Tests for DR1507.Richard Smith2012-10-181-1/+2
| | | | llvm-svn: 166162
* Update comment to match DR1502.Richard Smith2012-10-171-2/+1
| | | | llvm-svn: 166158
* DR1535: only potentially-evaluated typeid expressions are disallowed in constantRichard Smith2012-10-171-12/+6
| | | | | | expressions, not *any* typeid on a polymorphic class type. llvm-svn: 166156
* Fix -Woverloaded-virtual when the using statement refers to a base ↵David Blaikie2012-10-171-1/+6
| | | | | | | | | | | | | | | declaration of a virtual function. GCC and Clang both do not warn on: struct a { virtual void func(); }; struct b: a { virtual void func(); void func(int); }; struct c: b { void func(int); using b::func; }; but if the "using" was using a::func GCC would still remain silent where Clang would warn. This change makes Clang consistent with GCC's existing behavior. llvm-svn: 166154
* DR1528: C++11 doesn't allow repeated cv-qualifiers in declarators after all.Richard Smith2012-10-172-13/+11
| | | | llvm-svn: 166152
* Add -std=c++1y argument, for *highly* experimental C++14 support.Richard Smith2012-10-172-0/+3
| | | | llvm-svn: 166139
* [Doc parsing]: This patch adds <Declaration> tag to Fariborz Jahanian2012-10-172-2/+5
| | | | | | | | | | | XML comment for declarations which pretty-prints declaration. I had to XFAIL one test annotate-comments.cpp. This test is currently unmaintainable as written. Dmitri G., can you see what we can do about this test. We should change this test such that adding a new tag does not wreck havoc to the test. llvm-svn: 166130
* [analyzer] When binding to a ParenExpr, bind to its inner expression instead.Jordan Rose2012-10-171-89/+105
| | | | | | | | | | | | | This actually looks through several kinds of expression, such as OpaqueValueExpr and ExprWithCleanups. The idea is that binding and lookup should be consistent, and so if the environment needs to be modified later, the code doing the modification will not have to manually look through these "transparent" expressions to find the real binding to change. This is necessary for proper updating of struct rvalues as described in the previous commit. llvm-svn: 166121
* [analyzer] Create a temporary region when accessing a struct rvalue.Jordan Rose2012-10-172-36/+51
| | | | | | | | | | | | | | | | | | | | | | In C++, rvalues that need to have their address taken (for example, to be passed to a function by const reference) will be wrapped in a MaterializeTemporaryExpr, which lets CodeGen know to create a temporary region to store this value. However, MaterializeTemporaryExprs are /not/ created when a method is called on an rvalue struct, even though the 'this' pointer needs a valid value. CodeGen works around this by creating a temporary region anyway; now, so does the analyzer. The analyzer also does this when accessing a field of a struct rvalue. This is a little unfortunate, since the rest of the struct will soon be thrown away, but it does make things consistent with the rest of the analyzer. This allows us to bring back the assumption that all known 'this' values are Locs. This is a revised version of r164828-9, reverted in r164876-7. <rdar://problem/12137950> llvm-svn: 166120
* Revert r158009 since there are some uses of artificial functions inEric Christopher2012-10-171-6/+2
| | | | | | debug info. llvm-svn: 166109
* First version of matchers for Types and TypeLocs.Daniel Jasper2012-10-171-4/+15
| | | | | Review: http://llvm-reviews.chandlerc.com/D47 llvm-svn: 166094
* Set a special flag in class metadata when an Objective-C classJohn McCall2012-10-174-6/+32
| | | | | | | | | has ivars that require destruction, but none that require anything except zero-initialization. This is common in ARC and (when true throughout a class hierarchy) permits the elimination of an unnecessary message-send during allocation. llvm-svn: 166088
* Organize and rename the magic constants for class flags.John McCall2012-10-171-48/+54
| | | | | | No functionality change. llvm-svn: 166087
OpenPOWER on IntegriCloud