summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Fixing a conflict detection bug in tooling::deduplicateEdwin Vane2013-08-132-8/+14
| | | | | | | | If a Replacment is contained within the conflict range being built, the conflict range would be erroneously shortened. Now fixed. Tests updated to catch this case. llvm-svn: 188287
* Move logic to enable the vectorizer to clangArnold Schwaighofer2013-08-132-6/+49
| | | | | | | | | | | | | | | | | We used to decide whether to really vectorize depending on the optimization level in PassManagerBuilder. This patch moves this decision to the clang driver. We look at the optimization level and whether the f(no-)vectorize is set and decide whether to vectorize. This allows us to simplify the logic in PassManagerBuilder to just a check for whether the vectorizer should run or not. We now do the right thing for: $ clang -O1 -fvectorize $ clang -fno-vectorize -O3 llvm-svn: 188280
* Refactor "MatcherList" into "VariantMatcher" and abstract the notion of a ↵Samuel Benzaquen2013-08-1310-243/+309
| | | | | | | | | | | | | | | | list of matchers for the polymorphic case. Summary: Refactor "MatcherList" into "VariantMatcher" and abstract the notion of a list of matchers for the polymorphic case. This work is to support future changes needed for eachOf/allOf/anyOf matchers. We will add a new type on VariantMatcher. Reviewers: klimek CC: cfe-commits, revane Differential Revision: http://llvm-reviews.chandlerc.com/D1365 llvm-svn: 188272
* Fix xcore tests to use regex.Arnold Schwaighofer2013-08-131-8/+8
| | | | llvm-svn: 188271
* clang-format: Add option for the offset of constructor initializers.Daniel Jasper2013-08-133-3/+67
| | | | | | | | | | | | Some coding styles use a different indent for constructor initializers. Patch by Klemens Baum. Thank you. Review: http://llvm-reviews.chandlerc.com/D1360 Post review changes: Changed data type to unsigned as a negative indent width does not make sense and added test for configuration parsing. llvm-svn: 188260
* Add XCore targetRobert Lytton2013-08-139-1/+291
| | | | llvm-svn: 188258
* Fix typo in comment.David Majnemer2013-08-131-1/+1
| | | | | | Thanks Kim Gräsman! llvm-svn: 188257
* clang-format: Improve boolean expression formatting in macros.Daniel Jasper2013-08-132-1/+4
| | | | | | | | | | Before: #define IF(a, b, c) if (a&&(b == c)) After: #define IF(a, b, c) if (a && (b == c)) llvm-svn: 188256
* clang-format: Activate WebKit-style tests for MS compilers.Daniel Jasper2013-08-131-2/+2
| | | | | | They were accidentally placed in the #if. llvm-svn: 188255
* clang-format: Slightly adapt line break penalties.Daniel Jasper2013-08-132-1/+3
| | | | | | | | | | | Before: aaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaa) ->aaaaaaaaa()); After: aaaaaaaaaaaaaaaaaaaaaaaa( aaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaa)->aaaaaaaaa()); llvm-svn: 188253
* [-cxx-abi microsoft] Mangle __uuidof correctly into template parametersDavid Majnemer2013-08-135-13/+62
| | | | | | | | | | | | | | | | | | | | | | | Summary: It seems that __uuidof introduces a global extern "C" declaration of type __s_GUID. However, our implementation of __uuidof does not provide such a declaration and thus must open-code the mangling for __uuidof in template parameters. This allows us to codegen scoped COM pointers and other such things. This fixes PR16836. Depends on D1356. Reviewers: rnk, cdavis5x, rsmith Reviewed By: rnk CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1357 llvm-svn: 188252
* Drive by cleanupDavid Blaikie2013-08-131-7/+2
| | | | llvm-svn: 188251
* variable templates updated for PCH serialization... Still working on test ↵Larisse Voufo2013-08-136-3/+204
| | | | | | cases... llvm-svn: 188249
* AnalysisBasedWarnings.cpp:: Prune "\param VariableName", possibly copypasto, ↵NAKAMURA Takumi2013-08-132-12/+0
| | | | | | in comments. [-Wdocumentation] llvm-svn: 188248
* [-cxx-abi microsoft] Mangle TemplateArgument::Declaration for referencesDavid Majnemer2013-08-132-2/+15
| | | | | | | | | | | | | | | | Summary: Properly mangle declarations showing up in template arguments that are reference parameters. Fun-fact: undname cannot handle these! Reviewers: rnk, cdavis5x Reviewed By: rnk CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1356 llvm-svn: 188245
* Silence a warning from MSVC about not returning a valueReid Kleckner2013-08-131-0/+1
| | | | llvm-svn: 188237
* Remove Sema includes from Analysis code to fix layeringReid Kleckner2013-08-124-136/+91
| | | | | | | | | This moves a header-only class from Sema to Analysis and puts the option check in Sema. Patch by Chris Wailes! llvm-svn: 188230
* clang-cl: Sink /Fe and /Fo diagnostic code into BuildActionsHans Wennborg2013-08-122-29/+30
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D1370 llvm-svn: 188226
* 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
* clang-cl: Consolidate tests for /Fo and /Fe into cl-outputs.cHans Wennborg2013-08-123-65/+59
| | | | llvm-svn: 188213
* Add hooks to ExternalSemaSource for after-the-fact diagnosis ofKaelyn Uhrain2013-08-125-0/+93
| | | | | | 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-126-29/+105
| | | | | | | | 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-123-0/+15
| | | | | | | 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-123-2/+8
| | | | | | | | | 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-1213-6/+1639
| | | | | | | | | | | | | | | | | | 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
* Forgot to add unittests/Sema/ before committing r188196 :(Kaelyn Uhrain2013-08-123-0/+240
| | | | llvm-svn: 188197
* Add hooks for typo correction to ExternalSemaSource, courtesy of Luke Zarko.Kaelyn Uhrain2013-08-126-1/+52
| | | | llvm-svn: 188196
* clang-cl: Expand warning about /TC and /TP override, and expand testHans Wennborg2013-08-123-20/+37
| | | | llvm-svn: 188190
* [Mips] MSA frontend option supportJack Carter2013-08-125-2/+34
| | | | | | | | | | | 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
* This test passes on freebsd after r188178. Not exactly sure why.Benjamin Kramer2013-08-121-3/+0
| | | | llvm-svn: 188182
* SourceManager intialization tweaks.Benjamin Kramer2013-08-122-14/+15
| | | | | | | | | | - 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-122-5/+9
| | | | | | | | | | | | | 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
* Fix FileCheck --check-prefix lines.Tim Northover2013-08-12103-242/+242
| | | | | | | | | | Various tests had sprung up over the years which had --check-prefix=ABC on the RUN line, but "CHECK-ABC:" later on. This happened to work before, but was strictly incorrect. FileCheck is getting stricter soon though. Patch by Ron Ofir. llvm-svn: 188174
* clang-format: Correctly format alias declarations.Daniel Jasper2013-08-123-7/+13
| | | | | | | | | | | | | | 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-122-1/+12
| | | | | | | | | 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-105-21/+20
| | | | | | in include/clang/Basic/LLVM.h. llvm-svn: 188138
* Fix to PR16225 (Assert-on-invalid: isa<LabelDecl>(D) && "declaration not ↵Serge Pavlov2013-08-102-0/+16
| | | | | | | | 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-1013-91/+94
| | | | llvm-svn: 188134
* Avoid spurious error messages if parent template class cannot be instantiatedSerge Pavlov2013-08-104-6/+72
| | | | | | 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-105-40/+21
| | | | llvm-svn: 188128
* [analyzer] Update Open Projects and Potential Checkers pages.Jordan Rose2013-08-102-1/+61
| | | | | | | | | - va_list checker (PR16811 and PR16812) - Model floating-point values - Bound bitwise masking operations (PR16615) - Bound C string length (PR16558 and others) llvm-svn: 188127
* clang/test/Driver/cl-options.c: Suppress this on cygming due to -fno-builtin.NAKAMURA Takumi2013-08-101-0/+2
| | | | llvm-svn: 188126
* Correctly profile CXXPseudoDestructorExprs.Eli Friedman2013-08-092-2/+15
| | | | | | CXXPseudoDestructorExprs may not contain a type. PR16852. llvm-svn: 188123
OpenPOWER on IntegriCloud