summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Move checkStringLiteralArgument into Sema classTim Northover2013-10-011-16/+15
| | | | | | It's a useful function to have around for target-specific attributes. llvm-svn: 191768
* [ARM] Add -mfpu=none option to the driver.Amara Emerson2013-10-011-4/+39
| | | | llvm-svn: 191736
* [OpenMP] Added parsing and semantic analysis for firstprivate clauseAlexey Bataev2013-10-019-17/+333
| | | | llvm-svn: 191730
* Fix computation of linkage within nested lambdas.Faisal Vali2013-10-011-3/+31
| | | | | | | | | | When nested C++11 lambdas are used in NSDMI's - this patch prevents infinite recursion by computing the linkage of any nested lambda by determining the linkage of the outermost enclosing lambda (which might inherit its linkage from its parent). See http://llvm-reviews.chandlerc.com/D1783 for Doug's approval. [On a related note, I need this patch so as to pass tests of transformations of nested lambdas returned from member functions] llvm-svn: 191727
* Fix typo correction usage of SemaAccess.cpp.Eli Friedman2013-10-012-6/+4
| | | | | | | | | | When we check access for lookup results, make sure we propagate the result's access to the access control APIs; this can be different from the natural access of the declaration depending on the path used by the lookup. PR17394. llvm-svn: 191726
* Revert r191586 and r191695. They cause crashes when building withRichard Smith2013-10-014-14/+18
| | | | | | -relaxed-aliasing. llvm-svn: 191725
* Tweak changes in r186464 to avoid a crash.Eli Friedman2013-10-012-4/+4
| | | | | | | | | | | | | Currently, IR generation can't handle file-scope compound literals with non-constant initializers in C++. Fixes PR17415 (the first crash in the bug). (We should probably change (T){1,2,3} to use the same codepath as T{1,2,3} in C++ eventually, given that the semantics of the latter are actually defined by the standard.) llvm-svn: 191719
* Remove support for arrays of runtime bound in C++1y, now they have been votedRichard Smith2013-10-012-6/+1
| | | | | | out of the working paper. This reverts r179962 and r179992. llvm-svn: 191718
* Fix PR 12730: Add _GCC_HAVE_SYNC_COMPARE_AND_SWAP macros for ARMWeiming Zhao2013-09-301-0/+7
| | | | llvm-svn: 191707
* Changing __X86_64__ to __x86_64__ in Intrin.h.Warren Hunt2013-09-301-12/+12
| | | | llvm-svn: 191700
* Turn struct-path aware TBAA on by default.Manman Ren2013-09-302-3/+4
| | | | | | Use -no-struct-path-tbaa to turn it off. llvm-svn: 191695
* Adding intrinsics to the clang front end for the x86 TBM instruction set.Yunzhong Gao2013-09-303-0/+181
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D1751 llvm-svn: 191681
* Moving style option formatting to libFormatEdwin Vane2013-09-301-0/+78
| | | | | | | | | The help text for clang-format's -style option and the function that processes its value is moved to libFormat in this patch. The goal is to enable other tools that use libFormat and also have a -style option to behave consistently with clang-format. llvm-svn: 191666
* Fix use-after-free.Manuel Klimek2013-09-301-3/+3
| | | | | | | | TemplateDeclInstantiator takes the MultiLevelArgumentList by const-ref and stores a const-ref member. Thus, we must not pass a temporary into the constructor. llvm-svn: 191665
* clang-format: Improve alignment after 'return'.Daniel Jasper2013-09-302-9/+14
| | | | | | | | | | | | | | | | | Previously, comments, could totally confuse it. Before: return // true if code is one of a or b. code == a || code == b; After: return // true if code is one of a or b. code == a || code == b; llvm-svn: 191654
* SemaTemplateDeduction.cpp: Suppress a warning. [-Wunused-variable]NAKAMURA Takumi2013-09-301-1/+1
| | | | llvm-svn: 191648
* Revert the linkage fix.Faisal Vali2013-09-291-31/+5
| | | | | | I got a bunch of buildbot failures that i don't understand - sorry. llvm-svn: 191647
* Remove an unnecessary overload from ASTLambda.h Faisal Vali2013-09-291-1/+1
| | | | | | | As Richard pointed out to me, dyn_cast is very cheap - there is no real benefit from adding cluttery overloads to only avoid that cast. No functionality change. llvm-svn: 191646
* Fix computation of linkage within nested lambdas.Faisal Vali2013-09-291-5/+31
| | | | | | | | | | When nested lambdas are used in NSDMI's - this prevents infinite recursion. See http://llvm-reviews.chandlerc.com/D1783 for Doug's approval regarding the code, and then request for some tests. [On a related note, I need this patch so as to pass tests of transformations of nested lambdas returned from member functions] llvm-svn: 191645
* Fix windows newlines :(Faisal Vali2013-09-293-153/+153
| | | | llvm-svn: 191641
* Fix misspelling of -fmodules-decluse.Daniel Jasper2013-09-291-2/+2
| | | | llvm-svn: 191640
* clang-format: Fix assertion on incomplete string literals.Daniel Jasper2013-09-291-1/+5
| | | | | | | | Before, this could would lead to an assert: llvm::errs() << " << a; llvm-svn: 191639
* Implement conversion to function pointer for generic lambdas without captures.Faisal Vali2013-09-296-75/+315
| | | | | | | | | | | | | | | | The general strategy is to create template versions of the conversion function and static invoker and then during template argument deduction of the conversion function, create the corresponding call-operator and static invoker specializations, and when the conversion function is marked referenced generate the body of the conversion function using the corresponding static-invoker specialization. Similarly, Codegen does something similar - when asked to emit the IR for a specialized static invoker of a generic lambda, it forwards emission to the corresponding call operator. This patch has been reviewed in person both by Doug and Richard. Richard gave me the LGTM. A few minor changes: - per Richard's request i added a simple check to gracefully inform that captures (init, explicit or default) have not been added to generic lambdas just yet (instead of the assertion violation). - I removed a few lines of code that added the call operators instantiated parameters to the currentinstantiationscope. Not only did it not handle parameter packs, but it is more relevant in the patch for nested lambdas which will follow this one, and fix that problem more comprehensively. - Doug had commented that the original implementation strategy of using the TypeSourceInfo of the call operator to create the static-invoker was flawed and allowed const as a member qualifier to creep into the type of the static-invoker. I currently kludge around it - but after my initial discussion with Doug, with a follow up session with Richard, I have added a FIXME so that a more elegant solution that involves the use of TrivialTypeSourceInfo call followed by the correct wiring of the template parameters to the functionprototypeloc is forthcoming. Thanks! llvm-svn: 191634
* Add character set related __STDC_* definitions.Ed Schouten2013-09-292-0/+13
| | | | | | | | | | | | | Clang uses UTF-16 and UTF-32 for its char16_t's and char32_t's exclusively. This means that we can define __STDC_UTF_16__ and __STDC_UTF_32__ unconditionally. While there, define __STDC_MB_MIGHT_NEQ_WC__ for FreeBSD. FreeBSD's wchar_t's don't encode characters as ISO-10646; the encoding depends on the locale used. Because the character set used might not be a superset of ASCII, we must define __STDC_MB_MIGHT_NEQ_WC__. llvm-svn: 191631
* Implement C++1y sized deallocation (n3778). This is not enabled by -std=c++1y;Richard Smith2013-09-293-56/+144
| | | | | | | instead, it's enabled by the -cc1 flag -fsized-deallocation, until we sort out the backward-compatibility issues. llvm-svn: 191629
* Make helper function static.Benjamin Kramer2013-09-281-1/+1
| | | | llvm-svn: 191615
* Refactor comment merging.Benjamin Kramer2013-09-281-61/+45
| | | | | | | | | | | - We scan for whitespace between comments anyways, remember any newlines seen along the way. - Use this newline number to decide whether two comments are adjacent. - Since the newline check is now free remove the caching and unused code. - Remove unnecessary boolean state from the comment list. - No behavioral change. llvm-svn: 191614
* Separate construction of bi-arch path suffix from construction ofSimon Atanasyan2013-09-282-67/+61
| | | | | | | | | | | | | | multi-library path suffix. The code calculates MIPS toolchain specific multi-lib path suffixes like mips16/soft-float/el is moved to the separate function findMultiLibSuffix(). This function called during GCC installation detection and result is stored for the future using. The patch reviewed by Rafael Espindola. http://llvm-reviews.chandlerc.com/D1738 llvm-svn: 191612
* Add compat/extension warnings for init captures.Richard Smith2013-09-281-0/+4
| | | | llvm-svn: 191609
* Mark lambda init-captures as complete.Richard Smith2013-09-281-4/+5
| | | | llvm-svn: 191607
* Switch from putting init capture VarDecls in the surrounding DeclContext toRichard Smith2013-09-282-5/+12
| | | | | | | | putting them in the call operator's DeclContext. This better matches the language wording and avoids some cases where code gets confused by them for namespace-scope lambdas and the like. llvm-svn: 191606
* Per latest drafting, switch to implementing init-captures as if by declaringRichard Smith2013-09-2812-174/+122
| | | | | | and capturing a variable declaration, and complete the implementation of them. llvm-svn: 191605
* [analyzer] Make inlining decisions based on the callee being variadic.Jordan Rose2013-09-282-4/+17
| | | | | | | | | | | | ...rather than trying to figure it out from the call site, and having people complain that we guessed wrong and that a prototype-less call is the same as a variadic call on their system. More importantly, fix a crash when there's no decl at the call site (though we could have just returned a default value). <rdar://problem/15037033> llvm-svn: 191599
* Typo correction: _int64 -> __int64.Warren Hunt2013-09-281-1/+1
| | | | llvm-svn: 191592
* Implements some of the more commonly used intrinsics in Intrin.hWarren Hunt2013-09-271-0/+412
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D1766 llvm-svn: 191590
* Don't suggest namespaces if the next token is a '.'Kaelyn Uhrain2013-09-271-0/+3
| | | | llvm-svn: 191589
* TBAA: use the same format for scalar TBAA and struct-path aware TBAA.Manman Ren2013-09-272-15/+10
| | | | | | | Struct-path aware TBAA generates tags to specify the access path, while scalar TBAA only generates tags to scalar types. llvm-svn: 191586
* ObjectiveC migrator. Infer property from getters onlyFariborz Jahanian2013-09-271-1/+11
| | | | | | | if property name is a valid identifier in the underlying language. // rdar://15044184 llvm-svn: 191584
* Fix a bug where we failed to diagnose class template specializationChandler Carruth2013-09-271-0/+3
| | | | | | | | | uses. This fixes one of the two remaining failures to implement [[deprecated]] as specified for C++14. llvm-svn: 191572
* Replace -fobjc-default-synthesize-properties with ↵Rafael Espindola2013-09-272-5/+1
| | | | | | | | | disable-objc-default-synthesize-properties. We want the modern behavior most of the time, so inverting the option simplifies the driver and the tests. llvm-svn: 191551
* Mark variable template implementation as complete. Nearly all of the creditRichard Smith2013-09-271-1/+2
| | | | | | here goes to Larisse Voufo. llvm-svn: 191549
* Variable templates: handle instantiation of static data member templatesRichard Smith2013-09-277-160/+232
| | | | | | appropriately, especially when they appear within class templates. llvm-svn: 191548
* Don't give suggest things like function names on the left side of "=".Kaelyn Uhrain2013-09-271-0/+2
| | | | llvm-svn: 191545
* Avoid the hard-coded limit on the number of typo corrections attempted.Kaelyn Uhrain2013-09-271-15/+29
| | | | | | | | | | | | | | | Move some tests from typo-correction.cpp to typo-correction-pt2.cpp because they were running afoul of the hard-coded limit of 20 typos corrected. Some of the tests after it were still working due to the limit not applying to cached corrections and in cases where a non-NULL MemberContext is passed in to Sema::CorrectTypo. Most of the moved tests still passed after being moved, but the test involving "data_struct" had only been passing because the test had exceeded that limit so a fix for it is also included (most of the changes to ParseStmt.cpp are shared with and originated from another typo correction impovement that was split into a separate commit). llvm-svn: 191544
* Cache the location of failed typo corrections so that typo correctionKaelyn Uhrain2013-09-272-28/+29
| | | | | | isn't repeatedly attempted for the same identifier at the same location. llvm-svn: 191543
* clang-cl: pass /FI options to fallbackHans Wennborg2013-09-271-0/+4
| | | | | | | We started parsing /FI in r191442, and now we can pass it on to the fallback too. llvm-svn: 191537
* SourceManager: Open code isInMainFile.Benjamin Kramer2013-09-271-0/+30
| | | | | | | | | - We really shouldn't compute line numbers for every file that is asked if it's the main file, it destroys the lazy computation. - Invalid locations are no longer accounted to the main file, no other functionality change. llvm-svn: 191535
* Remove method that always returns true.Rafael Espindola2013-09-271-3/+1
| | | | llvm-svn: 191533
* [analyzer] Allow pre/post-statement checkers for UnaryOperator.Jordan Rose2013-09-271-20/+30
| | | | | | Found by Arthur Yoo. llvm-svn: 191532
* Added a comment and another test for the UT_ForIndentation optionAlexander Kornienko2013-09-271-0/+2
| | | | llvm-svn: 191530
OpenPOWER on IntegriCloud