summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* ObjectiveC migration. Add couple of routineFariborz Jahanian2013-08-121-1/+23
| | | | | | , currently unused, for future cf-annotation work. llvm-svn: 188224
* DebugInfo: Simplify declaration building code - relying on the limit debug ↵David Blaikie2013-08-121-17/+6
| | | | | | info checking already in CreateType(RecordType) llvm-svn: 188222
* DebugInfo: simplify some limited/declaration creation APIsDavid Blaikie2013-08-122-41/+11
| | | | llvm-svn: 188214
* Add hooks to ExternalSemaSource for after-the-fact diagnosis ofKaelyn Uhrain2013-08-122-0/+14
| | | | | | incomplete types, courtesy of Luke Zarko. llvm-svn: 188212
* Speculative build fix for r188206.Hans Wennborg2013-08-121-1/+1
| | | | | | | The cmake-clang-x86_64 was upset: error: 'template<class ImplClass, class RetTy> class clang::ConstStmtVisitor' used without template parameters llvm-svn: 188211
* clang-cl: Support the /Fe optionHans Wennborg2013-08-122-27/+69
| | | | | | | | This is used to name the linked output file. Differential Revision: http://llvm-reviews.chandlerc.com/D1344 llvm-svn: 188210
* Fix pretty-printing for unnamed unions.Eli Friedman2013-08-122-0/+4
| | | | | | | This is just a couple of minor fixes to account for the existence of ElaboratedType. llvm-svn: 188209
* Fix crash w/BlockDecl and invalid qualified decl.Eli Friedman2013-08-121-1/+4
| | | | | | | | | I'm not really satisfied with the ad-hoc nature of Sema::diagnoseQualifiedDeclaration, but I'm not sure how to fix it. Fixes <rdar://problem/14639501>. llvm-svn: 188208
* Patch by Chris Wailes <chris.wailes@gmail.com>.DeLesley Hutchins2013-08-124-6/+1012
| | | | | | | | | | | | | | | | | | Reviewed by delesley, dblaikie. Add the annotations and code needed to support a basic 'consumed' analysis. Summary: This new analysis is based on academic literature on linear types. It tracks the state of a value, either as unconsumed, consumed, or unknown. Methods are then annotated as CallableWhenUnconsumed, and when an annotated method is called while the value is in the 'consumed' state a warning is issued. A value may be tested in the conditional statement of an if-statement; when this occurs we know the state of the value in the different branches, and this information is added to our analysis. The code is still highly experimental, and the names of annotations or the algorithm may be subject to change. llvm-svn: 188206
* Add hooks for typo correction to ExternalSemaSource, courtesy of Luke Zarko.Kaelyn Uhrain2013-08-122-0/+24
| | | | llvm-svn: 188196
* clang-cl: Expand warning about /TC and /TP override, and expand testHans Wennborg2013-08-121-14/+16
| | | | llvm-svn: 188190
* [Mips] MSA frontend option supportJack Carter2013-08-122-2/+13
| | | | | | | | | | | This patch adds -mmsa and -mno-msa to the options supported by clang to enable and disable support for MSA. When MSA is enabled, a predefined macro '__mips_msa' is defined to 1. Patch by Daniel Sanders llvm-svn: 188184
* SourceManager intialization tweaks.Benjamin Kramer2013-08-121-13/+14
| | | | | | | | | | - Open files before calling stat on them. - Go through FileManager for getting the buffer of named pipes. It has the necessary plumbing to deal with "volatile" files. - Print the cause when stdin reading fails. The only case I can imagine where this happens is when stdin is wired to a device file, so no test case. llvm-svn: 188178
* clang-format: Improve stream-formatting.Daniel Jasper2013-08-121-4/+6
| | | | | | | | | | | | | Before: CHECK(controller->WriteProto(FLAGS_row_key, FLAGS_proto)) << "\"" << FLAGS_proto << "\""; After: SemaRef.Diag(Loc, diag::note_for_range_begin_end) << BEF << IsTemplate << Description << E->getType(); llvm-svn: 188175
* clang-format: Correctly format alias declarations.Daniel Jasper2013-08-122-7/+8
| | | | | | | | | | | | | | Before: template <class CallbackClass> using MyCallback = void(CallbackClass::*)(SomeObject * Data);"); After: template <class CallbackClass> using MyCallback = void (CallbackClass::*)(SomeObject *Data);"); Also fix three wrong indentations. llvm-svn: 188172
* Use new llvm::SpecialCaseList API in CodeGenModuleAlexey Samsonov2013-08-122-19/+17
| | | | llvm-svn: 188170
* This change fixes the formatting of statements such as catch (E& e).Manuel Klimek2013-08-121-1/+2
| | | | | | | | | Previously these were formatting as catch (E & e) because the inner parenthesis was being marked as an expression. Patch by Thomas Gibson-Robinson. llvm-svn: 188153
* Fix misindentation.Richard Smith2013-08-121-11/+11
| | | | llvm-svn: 188151
* Omit llvm:: before StringRef and SmallString. We have using directive in ↵Robert Wilhelm2013-08-102-4/+3
| | | | | | include/clang/Basic/LLVM.h. llvm-svn: 188139
* Omit llvm:: before SmallVector and SmallVectorImpl. We have using directive ↵Robert Wilhelm2013-08-104-20/+19
| | | | | | in include/clang/Basic/LLVM.h. llvm-svn: 188138
* Fix to PR16225 (Assert-on-invalid: isa<LabelDecl>(D) && "declaration not ↵Serge Pavlov2013-08-101-0/+3
| | | | | | | | instantiated in this scope") Differential Revision: http://llvm-reviews.chandlerc.com/D920 llvm-svn: 188137
* Added source locs for angled parentheses in class/var template partial specs.Enea Zaffanella2013-08-107-63/+64
| | | | llvm-svn: 188134
* 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
OpenPOWER on IntegriCloud