summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* clang-format: [JS] Support more regex literals.Daniel Jasper2014-10-291-12/+15
| | | | | | | | | | Previously a regex-literal containing "/*" would through clang-format off, e.g.: var regex = /\/*$/; Would lead to none of the following code to be formatted. llvm-svn: 220860
* CodeGen: add __readfsdword builtinSaleem Abdulrasool2014-10-292-4/+8
| | | | | | | | | The Windows NT SDK uses __readfsdword and declares it as a compiler provided builtin (#pragma intrinsic(__readfsword). Because intrin.h is not referenced by winnt.h, it is not possible to provide an out-of-line definition for the intrinsic. Provide a proper compiler builtin definition. llvm-svn: 220859
* Fix warning in Altivec code when building with GCC 4.8.2 on Ubuntu 14.04.Jay Foad2014-10-291-1/+1
| | | | llvm-svn: 220855
* Pass aggregates on the stack without splitting in NVPTX.Eli Bendersky2014-10-291-0/+4
| | | | | | | | | | | Following the NVVM IR specifications, arguments of aggregate type should be passed on the stack without splitting (byval). http://reviews.llvm.org/D6020 Patch by Jacques Pienaar. llvm-svn: 220854
* clang/lib/AST/Decl.cpp: Tweak isVLATypeCapturingAllowed() for -Asserts. ↵NAKAMURA Takumi2014-10-291-1/+3
| | | | | | [-Wunused-function] llvm-svn: 220853
* [PowerPC ABI] Bug 21398 - Consider C++ base classes in HA classificationUlrich Weigand2014-10-291-0/+16
| | | | | | | | As discussed in bug 21398, PowerPC ABI code needs to consider C++ base classes when classifying a class as homogeneous aggregate (or not) for ABI purposes. llvm-svn: 220852
* Improved capturing variable-length array types in CapturedStmt.Alexey Bataev2014-10-297-43/+66
| | | | | | | | An updated implemnentation of VLA types capturing based on previously committed solution for Lambdas. This version captures the whole VLA type instead of particular variables which are part of VLA size expression and allows to use previusly calculated size of VLA type in captured regions. Required for OpenMP. Differential Revision: http://reviews.llvm.org/D5099 llvm-svn: 220850
* Use enumerators instead of hardcoded integers when we decide if keyword is ↵Serge Pavlov2014-10-291-28/+38
| | | | | | enabled. llvm-svn: 220849
* Don't capture DeclRefExpr::getNameInfo().getInfo(). It returns reference in ↵NAKAMURA Takumi2014-10-291-1/+1
| | | | | | | | | | | | | | | | | | temporary object. DeclarationNameInfo::getInfo() returns reference, but DeclRefExpr::getNameInfo() returns temporary DeclarationNameInfo(). It triggered a local crash for me. Failing Tests (1): Clang :: SemaTemplate/instantiate-overload-candidates.cpp Assertion failed! Program: bin\clang.EXE File: clang/lib/Basic/SourceManager.cpp, Line 822 Expression: 0 && "Invalid SLocOffset or bad function choice" llvm-svn: 220841
* Objective-C modern rewriter. Patch to fix a rewriting bug Fariborz Jahanian2014-10-281-0/+4
| | | | | | | rewriting an Objective-C block. Patch by Ryan Govostes. rdar://18799145 llvm-svn: 220834
* clang-format: Improve && detection as binary operator.Daniel Jasper2014-10-281-1/+1
| | | | | | | | | | | | | | | | Before: template <class T, class = typename ::std::enable_if< ::std::is_array<T>{}&& ::std::is_array<T>{}>::type> void F(); After: template <class T, class = typename ::std::enable_if< ::std::is_array<T>{} && ::std::is_array<T>{}>::type> void F(); llvm-svn: 220813
* Objective-C. revert patch for rdar://17554063.Fariborz Jahanian2014-10-288-116/+20
| | | | llvm-svn: 220812
* clang-format: Improve && detection as binary operators.Daniel Jasper2014-10-281-0/+4
| | | | | | | | | | | | | | | Before: template <class T, class = typename std::enable_if<std::is_integral< T>::value &&(sizeof(T) > 1 || sizeof(T) < 8)>::type> void F(); After: template <class T, class = typename std::enable_if< std::is_integral<T>::value && (sizeof(T) > 1 || sizeof(T) < 8)>::type> void F(); llvm-svn: 220805
* [Objective-C]. revert r220740,r220727Fariborz Jahanian2014-10-281-16/+5
| | | | llvm-svn: 220802
* clang-format: Improve function declaration detection.Daniel Jasper2014-10-281-2/+1
| | | | | | | | | | | | | | | | | Before: ReturnType MACRO FunctionName() {} After: ReturnType MACRO FunctionName() {} This fixes llvm.org/PR21404. I wonder what the motivation for that if-condition was. But as no test breaks, ... llvm-svn: 220801
* PR21367: Don't accept rvalue references as an extension in C++98 mode if ↵Richard Smith2014-10-281-5/+17
| | | | | | we're in a new-type-id or conversion-type-id, since those things can legitimately be followed by a binary && operator. llvm-svn: 220785
* clang-format: [ObjC] Add separate flag to control indentation in blocksDaniel Jasper2014-10-282-4/+7
| | | | | | | | | | Apparently, people are very much divided on what the "correct" indentation is. So, best to give them a choice. The new flag is called ObjCBlockIndentWidth and the default is now set to the same value as IndentWidth for the pre-defined styles. llvm-svn: 220784
* [modules] Allow -I, -D, -W flags to change between building a module andRichard Smith2014-10-281-3/+18
| | | | | | | | explicitly using the resulting .pcm file. Unlike for an implicit module build, we don't need nor want to require these flags to match between the module and its users. llvm-svn: 220780
* clang-format: Don't put functions on a single line in Google's JavaDaniel Jasper2014-10-281-0/+1
| | | | | | style. llvm-svn: 220778
* Add valueDecl() matcher.Samuel Benzaquen2014-10-281-0/+1
| | | | | | | | | | | | Summary: Add valueDecl() matcher. Reviewers: klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D6005 llvm-svn: 220776
* Driver: remove a stray s that propagated in cross-windowsSaleem Abdulrasool2014-10-281-1/+1
| | | | | | The option is '--allow-multiple-definition' not '--allow-multiple-definitions'. llvm-svn: 220760
* Update for LLVM API change.Rafael Espindola2014-10-281-1/+1
| | | | llvm-svn: 220742
* Remove unused variable.Richard Smith2014-10-271-2/+1
| | | | llvm-svn: 220738
* Use the newer/simple API for passing a diagnostic handler to the IR linker.Rafael Espindola2014-10-271-16/+5
| | | | llvm-svn: 220733
* [modules] Load .pcm files specified by -fmodule-file lazily.Richard Smith2014-10-273-53/+89
| | | | llvm-svn: 220731
* Objective-C ARC [qoi]. Issue diagnostic if __bridge castingFariborz Jahanian2014-10-271-5/+16
| | | | | | to C type a collection literal. rdar://18768214 llvm-svn: 220727
* Frontend: Don't include stdin in the dependency list for an object fileDavid Majnemer2014-10-271-2/+11
| | | | | | | | | GCC doesn't do this and it semes weird to include a file that we can't open. This fixes PR21362. llvm-svn: 220726
* Frontend: Define __EXCEPTIONS if -fexceptions is passedDavid Majnemer2014-10-271-1/+1
| | | | | | | | | GCC defines __EXCEPTIONS, regardless of language mode, if -fexceptions is passed. We should do the same. This fixes PR21358. llvm-svn: 220714
* Do not insert asan paddings after fields that have flexible arrays.Kostya Serebryany2014-10-271-3/+8
| | | | | | | | | | | | | | | | | | | Summary: We should avoid a tail padding not only if the last field has zero size but also if the last field is a struct with a flexible array. If/when http://reviews.llvm.org/D5478 is committed, this will also handle the case of structs with zero-sized arrays. Reviewers: majnemer, rsmith Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D5924 llvm-svn: 220708
* c++11 patch to issue warning on missing 'override' on Fariborz Jahanian2014-10-271-1/+29
| | | | | | | overriding methods. Patch review by Richard Smith. rdar://18295240 llvm-svn: 220703
* Wire up LookupMemberExpr to use the new TypoExpr.Kaelyn Takata2014-10-272-11/+150
| | | | | | | | This includes adding the new TypoExpr-based lazy typo correction to LookupMemberExprInRecord as an alternative to the existing eager typo correction. llvm-svn: 220698
* Add a callback for recovering using a typo correction.Kaelyn Takata2014-10-272-12/+20
| | | | | | | Also keep track of the stack of Exprs visited during the tree transform so the callback can be passed the parent of the TypoExpr. llvm-svn: 220697
* Add simple way for a CorrectionCandidateCallback to reject exactKaelyn Takata2014-10-271-47/+50
| | | | | | | | | | | | | | | matches of the typo. Also be more proactive about checking a correction's visibility so that a correction requiring a module import can be distinguished from the original typo even if it looks identical. Otherwise the correction will be excluded and the diagnostic about needing the module import won't be emitted. Note that no change was made to checkCorrectionVisibility other than moving where it is at in SemaLookup.cpp. llvm-svn: 220696
* Start adding the infrastructure for handling TypoExprs.Kaelyn Takata2014-10-273-104/+334
| | | | | | | | | | | | | | | | Part of the infrastructure is a map from a TypoExpr to the Sema-specific state needed to correct it, along with helpers to ease dealing with the state. The the typo count is propagated up the stack of ExpressionEvaluationContextRecords when one is popped off of to avoid accidentally dropping TypoExprs on the floor. For example, the attempted correction of g() in test/CXX/class/class.mem/p5-0x.cpp happens with an ExpressionEvaluationContextRecord that is popped off the stack prior to ActOnFinishFullExpr being called and the tree transform for TypoExprs being run. llvm-svn: 220695
* Have TypoCorrectionConsumer remember the TypoCorrections it returned.Kaelyn Takata2014-10-271-4/+12
| | | | | | | | | | | Two additional methods are provided: one to return the current correction (the last correction returned by getNextCorrection), and one to "reset" the state so that getNextCorrection will return the previous corrections before returning any new corrections. Also ensure that all TypoCorrections have valid source ranges. llvm-svn: 220694
* Pass around CorrectionCandidateCallbacks as unique_ptrs soKaelyn Takata2014-10-2718-149/+155
| | | | | | TypoCorrectionConsumer can keep the callback around as long as needed. llvm-svn: 220693
* Add the initial TypoExpr AST node for delayed typo correction.Kaelyn Takata2014-10-2711-1/+32
| | | | llvm-svn: 220692
* Move TypoCorrectionConsumer into a header.Kaelyn Takata2014-10-271-151/+2
| | | | | | | | | This makes it available outside of SemaLookup.cpp, as needed for the forthcoming TypoExpr AST node which will keep a TypoCorrectionConsumer that provides the possible typo corrections for that TypoExpr. llvm-svn: 220691
* clang-format: Don't break after very short return types.Daniel Jasper2014-10-271-0/+6
| | | | | | | | | | | | | | Before: void SomeFunction(int parameter); After: void SomeFunction( int parameter); (Unless AlwaysBreakAfterDefinitionReturnType after type is set). llvm-svn: 220686
* clang-format: Fix bad merging of lines in nested blocks.Daniel Jasper2014-10-272-5/+10
| | | | | | | | | | | | | | | Before: SomeFunction([]() { #define A a return 43; }); After: SomeFunction([]() { #define A a return 43; }); llvm-svn: 220684
* Speed up clang-tidy when profiling in on.Samuel Benzaquen2014-10-271-15/+31
| | | | | | | | | | | | | | | | Summary: Speed up clang-tidy when profiling in on. It makes profiling runs twice as fast by reusing the time samples between the different actions. It also joins together the sampling of different matchers of the same check. Reviewers: alexfh Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D5972 llvm-svn: 220682
* Allow thread sanitizer in clang driver on FreeBSDViktor Kutuzov2014-10-271-4/+9
| | | | | | http://reviews.llvm.org/D5999 llvm-svn: 220680
* clang-format: [Proto] Change formatting text-formatted options.Daniel Jasper2014-10-272-3/+2
| | | | | | | | | | | | | | Before: optional Type type = 1 [(mutate_options) = {vital : true abc : false}]; After: optional Type type = 1 [(mutate_options) = { vital : true abc : false }]; llvm-svn: 220679
* Prune CRLF.NAKAMURA Takumi2014-10-271-2/+2
| | | | llvm-svn: 220678
* Revert rL220675 due to failures on check-clangViktor Kutuzov2014-10-271-6/+1
| | | | llvm-svn: 220677
* Allow thread sanitizer in clang driver on FreeBSDViktor Kutuzov2014-10-271-1/+6
| | | | | | Differential Revision: http://reviews.llvm.org/D5994 llvm-svn: 220675
* Fix unicode chars into ascii in comment lines.NAKAMURA Takumi2014-10-271-1/+1
| | | | llvm-svn: 220668
* Fix 80-column and other odd formatting.Eric Christopher2014-10-261-427/+388
| | | | llvm-svn: 220659
* Make VFS and FileManager match the current MemoryBuffer API.Benjamin Kramer2014-10-2613-153/+113
| | | | | | | This eliminates converting back and forth between the 3 formats and gives us a more homogeneous interface. llvm-svn: 220657
* ModuleMap.cpp: fix Windows build, take 2Hans Wennborg2014-10-261-2/+3
| | | | llvm-svn: 220646
OpenPOWER on IntegriCloud