summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Avoid spurious error messages if parent template class cannot be instantiatedSerge Pavlov2013-08-102-1/+8
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D924 llvm-svn: 188133
* Fix warning in builds without asserts.Rafael Espindola2013-08-101-0/+1
| | | | llvm-svn: 188132
* Simplify now that llvm::sys::current_path checks $PWD.Rafael Espindola2013-08-102-35/+10
| | | | llvm-svn: 188128
* Correctly profile CXXPseudoDestructorExprs.Eli Friedman2013-08-091-1/+8
| | | | | | CXXPseudoDestructorExprs may not contain a type. PR16852. llvm-svn: 188123
* Expose LambdaIntroducer::DefaultLoc in the AST's LambdaExpr.James Dennett2013-08-095-11/+27
| | | | | | | | | | | | | | | | | | | | | Summary: Source-centric tools need access to the location of a C++11 lambda expression's capture-default ('&' or '=') when it's present. It's possible for them to find it by re-lexing and re-implementing rules that Clang's parser has already applied, but the cost of storing the SourceLocation and making it available to them is 32 bits per LambdaExpr (a small delta, proportionally), and the simplification in client code is significant. Reviewers: rsmith Reviewed By: rsmith CC: cfe-commits, klimek, revane Differential Revision: http://llvm-reviews.chandlerc.com/D1192 llvm-svn: 188121
* Fix for PR16570: when comparing two function pointers, discard qualifiers whenRichard Trieu2013-08-091-1/+2
| | | | | | | | | | comparing non-reference function parameters. The qualifiers don't matter for comparisons. This is a re-commit of r187769, which was accidentially reverted in r187770, with a simplification at the suggestion of Eli Friedman. llvm-svn: 188112
* [arcmt] When handling unbridged casts, handle the body of BlockDecl ↵Argyrios Kyrtzidis2013-08-091-0/+7
| | | | | | | | | | separately because ParentMap does not record Stmt parent nodes inside a BlockDecl. Fixes rdar://14686900 llvm-svn: 188101
* Omit llvm:: before ArrayRef, as we have using llvm::ArrayRef in ↵Robert Wilhelm2013-08-097-35/+28
| | | | | | include/clang/Basic/LLVM.h. llvm-svn: 188089
* Remove "static" on simple temporary StringRef.Benjamin Kramer2013-08-091-1/+1
| | | | llvm-svn: 188088
* clang-cl: Don't pass /defaultlib to the linkerHans Wennborg2013-08-091-1/+2
| | | | | | | Since r187945, clang-cl will add the runtime library dependency to the .obj file. llvm-svn: 188086
* Only emit debug info for implicit members that actually get codegen, not ↵David Blaikie2013-08-091-7/+10
| | | | | | | | | | | | just ODR use. This includes special members (copy/default ctor, copy assign, default ctor) and template specializations for member function templates. Good for a 5% decrease (1.80 to 1.71 GB) in size on Clang+LLVM's .dwo files (when using fission). llvm-svn: 188085
* Add a convenient way to compare GCCVersions without creating temporary objects.Benjamin Kramer2013-08-092-16/+21
| | | | | | No functionality change. llvm-svn: 188084
* DirectIvarAssignment: Replace vtable'd objects with simple functions.Benjamin Kramer2013-08-091-31/+19
| | | | | | Avoids unnecessary static constructors. llvm-svn: 188083
* Fixup for r188058: assume hasAsanZeroBaseShadow() is false if ASan is not neededAlexey Samsonov2013-08-091-0/+2
| | | | llvm-svn: 188068
* Put back a microoptimization with a comment to make it more obvious.Benjamin Kramer2013-08-091-2/+5
| | | | llvm-svn: 188063
* Sema: Assertion failure during CodeGen in CodeGenModule::EmitUuidofInitializerDavid Majnemer2013-08-091-21/+10
| | | | | | | | | Make sure we can properly generate code when the UUID has curly braces on it, strip the curly braces at the sema layer. This fixes PR16813. llvm-svn: 188061
* [-cxx-abi microsoft] Mangle UUIDs correctly, stick them in the proper sectionDavid Majnemer2013-08-091-2/+3
| | | | | | Revert r188055 which reverted r188053. An unrelated change previously snuck in. llvm-svn: 188060
* [analyzer] Enable usage of temporaries in InitListExprsPavel Labath2013-08-091-2/+0
| | | | | | | | | | | | | | | | | | Summary: ExprEngine had code which specificaly disabled using CXXTempObjectRegions in InitListExprs. This was a hack put in r168757 to silence a false positive. The underlying problem seems to have been fixed in the mean time, as removing this code doesn't seem to break anything. Therefore I propose to remove it and solve PR16629 in the process. Reviewers: jordan_rose CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1325 llvm-svn: 188059
* Make SanitizerArgs parsing toolchain-independentAlexey Samsonov2013-08-094-35/+51
| | | | llvm-svn: 188058
* Use isCharInSet from llvm/Support/UnicodeCharRanges.h, added a test for ↵Alexander Kornienko2013-08-091-89/+1
| | | | | | | | | | | | | | | | double-width characters in FixIt-hints. Summary: This is a follow-up to r187837. Reviewers: gribozavr, jordan_rose Reviewed By: jordan_rose CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1306 llvm-svn: 188056
* Revert "[-cxx-abi microsoft] Mangle UUIDs correctly, stick them in the ↵David Majnemer2013-08-092-4/+6
| | | | | | | | | | proper section" This commit reverts r188053. It is breaking the build bots. llvm-svn: 188055
* [-cxx-abi microsoft] Mangle UUIDs correctly, stick them in the proper sectionDavid Majnemer2013-08-092-6/+4
| | | | | | | | | | | | We mangled them like: L___uuid_12345678-1234-1234-1234-123456789abc We should've mangled them like: __GUID_12345678_1234_1234_1234_123456789abc Furthermore, they are external symbols. llvm-svn: 188053
* Implement [class.friend]p11's special name lookup rules for friend declarationsRichard Smith2013-08-095-67/+102
| | | | | | | | of local classes. We were previously handling this by performing qualified lookup within a function declaration(!!); replace it with the proper scope lookup. llvm-svn: 188050
* [analyzer] Warn when using 'delete' on an uninitialized variable.Jordan Rose2013-08-091-1/+29
| | | | | | Patch by Karthik Bhat, modified slightly by me. llvm-svn: 188043
* clang-cl: Support /showIncludesHans Wennborg2013-08-094-8/+25
| | | | | | | | | | This option prints information about #included files to stderr. Clang could already do it, this patch just teaches the existing code about the /showIncludes style and adds the flag. Differential Revision: http://llvm-reviews.chandlerc.com/D1333 llvm-svn: 188037
* unbreak buildbot on Windows.Fariborz Jahanian2013-08-081-1/+1
| | | | llvm-svn: 188018
* ObjectiveC migrator: tighten rule about when toFariborz Jahanian2013-08-081-2/+2
| | | | | | | migrate to @property with getter name starting with 'is'. llvm-svn: 188013
* ObjectiveC migration: Handle another special case ofFariborz Jahanian2013-08-081-18/+65
| | | | | | | setter/getter methods which can be migrated to a @property. llvm-svn: 188005
* clang-cl: use MS C++ ABIHans Wennborg2013-08-081-0/+4
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D1329 llvm-svn: 188000
* Fix alignof computation of large arrays on x86_64.Rafael Espindola2013-08-081-9/+4
| | | | | | | | | | | We were exposing the extra alignment given to large arrays. The new behavior matches gcc, which is a good thing since this is a gcc extension. Thanks to Joerg Sonnenberger for noticing it. While at it, centralize the method description in the .h file. llvm-svn: 187999
* Revert "clang-cl: Hook up /Za to prevent adding oldnames.lib dependency"Reid Kleckner2013-08-081-5/+4
| | | | | | | | This reverts commit r187991 and adjusts the comment. /Za is much more involved, and we don't want to give anyone the impression we actually support it. llvm-svn: 187998
* clang-cl: Hook up /Za to prevent adding oldnames.lib dependencyHans Wennborg2013-08-081-4/+5
| | | | | | | | The /Za flag should probably do more, but let's start with this. Differential Revision: http://llvm-reviews.chandlerc.com/D1320 llvm-svn: 187991
* Introduce Replacement deduplication and conflict detection functionEdwin Vane2013-08-081-0/+44
| | | | | | | | | | Summary: This patch adds tooling::deduplicate() which removes duplicates from and looks for conflicts in a vector of Replacements. Differential Revision: http://llvm-reviews.chandlerc.com/D1314 llvm-svn: 187979
* Factor out parsing sanitizer arguments to a separate functionAlexey Samsonov2013-08-082-6/+22
| | | | llvm-svn: 187977
* Remove unused variable. No functionality change.Benjamin Kramer2013-08-081-8/+6
| | | | llvm-svn: 187975
* Move SanitizerArgs implementation from .h to .cppAlexey Samsonov2013-08-084-262/+308
| | | | llvm-svn: 187972
* The only useful loop unrolling flag to give realistically isChandler Carruth2013-08-082-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | '-fno-unroll-loops'. The option to the backend is even called 'DisableUnrollLoops'. This is precisely the form that Clang *didn't* support. We didn't recognize the flag, we didn't pass it to the CC1 layer, and even if we did we wouldn't use it. Clang only inspected the positive form of the flag, and only did so to enable loop unrolling when the optimization level wasn't high enough. This only occurs for an optimization level that even has a chance of running the loop unroller when optimizing for size. This commit wires up the 'no' variant, and switches the code to actually follow the standard flag pattern of using the last flag and allowing a flag in either direction to override the default. I think this is still wrong. I don't know why we disable the loop unroller entirely *from Clang* when optimizing for size, as the loop unrolling pass *already has special logic* for the case where the function is attributed as optimized for size! We should really be trusting that. Maybe in a follow-up patch, I don't really want to change behavior here. llvm-svn: 187969
* Revert r187935 "Support for double width characters."Arnold Schwaighofer2013-08-081-20/+9
| | | | | | It broke a public build bot. llvm-svn: 187957
* Emit an error for enum increments and decrements in C++ mode.Richard Trieu2013-08-081-0/+4
| | | | | | Fixes PR16394. llvm-svn: 187955
* UBSan: Fix alignment checks emitted in downcasts.Filipe Cabecinhas2013-08-082-10/+13
| | | | | | | | | | | Summary: UBSan was checking for alignment of the derived class on the pointer to the base class, before converting. With some class hierarchies, this could generate false positives. Added test-case. llvm-svn: 187948
* clang-cl: Support the run-time selection options (/MD, /MT et al.)Hans Wennborg2013-08-084-0/+53
| | | | | | | | | | | | These flags set some preprocessor macros and injects a dependency on the runtime library into the object file, which later is picked up by the linker. This also adds a new CC1 flag for adding a dependent library. Differential Revision: http://llvm-reviews.chandlerc.com/D1315 llvm-svn: 187945
* Support for double width characters.Alexander Kornienko2013-08-071-9/+20
| | | | | | | | | | | | | | Summary: Only works for UTF-8-encoded files. Reviewers: djasper Reviewed By: djasper CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D1311 llvm-svn: 187935
* DataFlowSanitizer; Clang changes.Peter Collingbourne2013-08-074-1/+24
| | | | | | | | | | | | | DataFlowSanitizer is a generalised dynamic data flow analysis. Unlike other Sanitizer tools, this tool is not designed to detect a specific class of bugs on its own. Instead, it provides a generic dynamic data flow analysis framework to be used by clients to help detect application-specific issues within their own code. Differential Revision: http://llvm-reviews.chandlerc.com/D966 llvm-svn: 187925
* PR9992: Serialize and deserialize the token sequence for a function template inRichard Smith2013-08-0711-57/+119
| | | | | | -fdelayed-template-parsing mode. Patch by Will Wilson! llvm-svn: 187916
* [PCH] Fix a PCH serialization crash, with invalid code related to forward ↵Argyrios Kyrtzidis2013-08-072-3/+22
| | | | | | | | | | | | | | | | enum references. The problem was that an enum without closing semicolon could be associated as a forward enum in an erroneous declaration, leading to the identifier being associated with the enum decl but without a declaration actually referencing it. This resulted in not having it serialized before serializing the identifier that is associated with. Also prevent the ASTUnit from querying the serialized DeclID for an invalid top-level decl; it may not have been serialized. rdar://14539667 llvm-svn: 187914
* Fixes a couple of bugs with the Allman brace breaking.Manuel Klimek2013-08-072-0/+5
| | | | | | | | | | | In particular, left braces after an enum declaration now occur on their own line. Further, when short ifs/whiles are allowed these no longer cause the left brace to be on the same line as the if/while when a brace is included. Patch by Thomas Gibson-Robinson. llvm-svn: 187901
* Correctly allign arrays on 32 bit systems.Rafael Espindola2013-08-071-7/+8
| | | | | | | | | | | Before this patch we would align long long int big[1024]; to 4 bytes on 32 bit systems. The problem is that we were only looking at the element type when getLargeArrayMinWidth returned non zero. llvm-svn: 187897
* Patch to fix doxygen trailing comments for ObjectiveC methods.Fariborz Jahanian2013-08-071-1/+1
| | | | | | // rdar://14258334 llvm-svn: 187893
* clang-format: Fix corner case in OpenMP pragma formatting.Daniel Jasper2013-08-071-1/+2
| | | | | | | | | Before: #pragma omp reduction( | : var) After: #pragma omp reduction(| : var) llvm-svn: 187892
* Eliminate CXXConstructorDecl::IsImplicitlyDefined.Jordan Rose2013-08-075-11/+4
| | | | | | | | | | | | This field is just IsDefaulted && !IsDeleted; in all places it's used, a simple check for isDefaulted() is superior anyway, and we were forgetting to set it in a few cases. Also eliminate CXXDestructorDecl::IsImplicitlyDefined, for the same reasons. No intended functionality change. llvm-svn: 187891
OpenPOWER on IntegriCloud