summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer] This implements potential undefbehavior.ZeroAllocDereference checker.Anton Yartsev2015-04-145-12/+302
| | | | | TODO: support realloc(). Currently it is not possible due to the present realloc() handling. Currently RegionState is not being attached to realloc() in case of a zero Size argument. llvm-svn: 234889
* [Mips] Generate warning for invalid '-mnan' and '-march' combinationsPetar Jovanovic2015-04-148-9/+82
| | | | | | | | | | | | This patch generates a warning for invalid combination of '-mnan' and '-march' options, it properly sets NaN encoding for a given '-march', and it passes a proper NaN encoding to the assembler. Patch by Vladimir Radosavljevic. Differential Revision: http://reviews.llvm.org/D8170 llvm-svn: 234882
* Remove useless statement.Nikola Smiljanic2015-04-141-1/+0
| | | | llvm-svn: 234881
* [OPENMP] Fixed codegen for arrays in 'copyprivate' clause.Alexey Bataev2015-04-147-159/+222
| | | | | | | Fixed a bug with codegen of variables with array types specified in 'copyprivate' clause of 'single' directive. Differential Revision: http://reviews.llvm.org/D8914 llvm-svn: 234856
* [OPENMP] Initial codegen for 'parallel sections' directive.Alexey Bataev2015-04-144-26/+139
| | | | | | | | | | | | | | | Emits code for outlined 'parallel' directive with the implicitly inlined 'sections' directive: ... call __kmpc_fork_call(..., outlined_function, ...); ... define internal void outlined_function(...) { <code for implicit sections directive>; } Differential Revision: http://reviews.llvm.org/D8997 llvm-svn: 234849
* DebugInfo: Prepare for DISubprogram/DILexicalBlock* to be guttedDuncan P. N. Exon Smith2015-04-141-9/+8
| | | | | | | An upcoming LLVM commit will remove this API, so stop using it. Just access the raw pointers using `operator->()`. llvm-svn: 234848
* Add new warning -Wrange-loop-analysis to warn on copies during loops.Richard Trieu2015-04-134-3/+474
| | | | | | | | | | | | -Wrange-loop-analysis is a subgroup of -Wloop-analysis and will warn when a range-based for-loop makes copies of the elements in the range. If possible, suggest the proper type to prevent copies, or the non-reference to help distinguish copy versus non-copy forms. Existing warnings in -Wloop-analysis are moved to -Wfor-loop-analysis, also a subgroup of -Wloop-analysis. Differential Revision: http://reviews.llvm.org/D4169 llvm-svn: 234804
* Revert r234613 (and follow-ups 234614, 234616, 234618), it caused PR23216.Nico Weber2015-04-1311-404/+371
| | | | llvm-svn: 234789
* Revert r234786, it contained a bunch of stuff I did not mean to commit.Nico Weber2015-04-1316-385/+409
| | | | llvm-svn: 234787
* Revert r234613 (and follow-ups 234614, 234616, 234618), it caused PR23216.Nico Weber2015-04-1316-409/+385
| | | | llvm-svn: 234786
* [CodeGen] Fix crash with duplicated mangled name.Argyrios Kyrtzidis2015-04-133-8/+28
| | | | | | Patch by Yunzhong Gao! llvm-svn: 234767
* [libclang] Add functions to get information about fields.Argyrios Kyrtzidis2015-04-138-33/+239
| | | | | | Patch by Loïc Jaquemet! llvm-svn: 234762
* clang-format: [JS] Support index signature types.Daniel Jasper2015-04-132-1/+6
| | | | | | Patch by Martin Probst. llvm-svn: 234754
* clang-format: [JS] support optionality markers in JS types.Daniel Jasper2015-04-133-10/+31
| | | | | | Patch by Martin Probst. Thank you. llvm-svn: 234753
* clang-format: [JS] Allow periods and commata in class declarations.Daniel Jasper2015-04-132-1/+3
| | | | | | Patch by Martin Probst. Thank you. llvm-svn: 234752
* InstrProf: Simplify getStmtCount by using an OptionalJustin Bogner2015-04-132-16/+11
| | | | llvm-svn: 234750
* Bring r234620 back now that llvm is fixed.Rafael Espindola2015-04-132-6/+12
| | | | | | | | | | LLVM can now detect if a fd is seekable on windows. Original commit message: Actually check if lseek works instead of using a filename based heuristic. llvm-svn: 234738
* Reformat.NAKAMURA Takumi2015-04-131-3/+3
| | | | llvm-svn: 234731
* Revert r234620 and others, "Actually check if lseek works instead of using a ↵NAKAMURA Takumi2015-04-132-16/+6
| | | | | | | | | | filename based heuristic." It was affected by r234615, which was reverted in r234721. r234620, "Actually check if lseek works instead of using a filename based heuristic." r234621, "Testcase for the previous commit." r234718, "Suppress clang/test/PCH/emit-pth.c on win32, for now while investigating." llvm-svn: 234730
* [OPENMP] Initial codegen for 'parallel for' directive.Alexey Bataev2015-04-132-3/+412
| | | | | | | Allows generation of combined 'parallel for' directive that represents 'parallel' region with internal implicit 'for' worksharing region. Differential Revision: http://reviews.llvm.org/D8631 llvm-svn: 234722
* Suppress clang/test/PCH/emit-pth.c on win32, for now while investigating.NAKAMURA Takumi2015-04-131-0/+3
| | | | | | MSVCRT's _lseek(SEEK_CUR) doesn't return -1 for raw_ostream::SupportSeeking. llvm-svn: 234718
* clang-cl: Expose -f[no-]diagnostics-colorHans Wennborg2015-04-122-2/+6
| | | | | | | If we have -f[no-]color-diagnostics, we might as well have these too. llvm-svn: 234702
* Revert r234581, it might have caused a few miscompiles in Chromium.Nico Weber2015-04-1123-419/+50
| | | | | | | If the revert helps, I'll get a repro this Monday. Else I'll put the change back in. llvm-svn: 234700
* DebugInfo: Switch from replaceAllUsesWith() to replaceTemporary()Duncan P. N. Exon Smith2015-04-111-8/+8
| | | | | | | | Stop using `DIDescriptor`'s wrapper around `MDNode::replaceAllUsesWith()` (which is going away). The new home for this logic is `DIBuilder::replaceTemporary()`, added in LLVM r234695. llvm-svn: 234696
* Remove empty non-virtual destructors or mark them =default when non-publicBenjamin Kramer2015-04-1115-33/+8
| | | | | | These add no value but can make a class non-trivially copyable. NFC. llvm-svn: 234689
* clang/test/CodeGenCXX/static-data-member-single-emission.cpp: Tweak for MS ↵NAKAMURA Takumi2015-04-111-0/+1
| | | | | | mangler. llvm-svn: 234687
* clang-cl: support -fno-color-diagnostics (PR23109)Hans Wennborg2015-04-112-1/+4
| | | | | | Patch by Bernard Solomon, tests by me. llvm-svn: 234685
* clang-cl: support -fmacro-backtrace-limitHans Wennborg2015-04-112-4/+5
| | | | | | | Also fix the test for "core options" to actually fail in case an option isn't supported. llvm-svn: 234684
* Add Clang support for -mdirect-move on PPCNemanja Ivanovic2015-04-112-1/+16
| | | | | | | | | | This patch corresponds to review: http://reviews.llvm.org/D8930 This just adds a front end option to let the back end know the target has PPC direct move instructions. llvm-svn: 234683
* Use 'override/final' instead of 'virtual' for overridden methodsAlexander Kornienko2015-04-1198-327/+305
| | | | | | | | | | | | | | | | | | | | Summary: The patch is generated using clang-tidy misc-use-override check. This command was used: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \ -checks='-*,misc-use-override' -header-filter='llvm|clang' -j=32 -fix Reviewers: dblaikie Reviewed By: dblaikie Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D8926 llvm-svn: 234678
* Improve the error message for assigning to read-only variables.Richard Trieu2015-04-1114-26/+563
| | | | | | | | | | Previously, many error messages would simply be "read-only variable is not assignable" This change provides more information about why the variable is not assignable, as well as note to where the const is located. Differential Revision: http://reviews.llvm.org/D4479 llvm-svn: 234677
* Only notify consumers about static data members of class templates onceReid Kleckner2015-04-112-7/+44
| | | | llvm-svn: 234675
* [Driver] Properly support -mglobal-merge using explicit options.Ahmed Bougacha2015-04-117-31/+52
| | | | | | | | Follow-up to r234666. With this, the -m[no-]global-merge options have the expected behavior. Previously, -mglobal-merge was ignored, and there was no way of enabling the optimization. llvm-svn: 234668
* NaCl ARM: fix assembler float abi flagsDerek Schuff2015-04-102-1/+5
| | | | | | | | | | | | | | | | | | Summary: tools::arm::getARMFloatABI() was falling back to guessing soft-float because it wasn't seeing the GNUEABIHF environment from ComputeEffectivClangTriple when it was called from gnutools::Assemble::ConstructJob. Fix by using the effective clang triple in gnutools::Assemble, which now matches the -triple flag used by cc1 and ClangAs jobs. Reviewers: jvoung Subscribers: rengolin, jfb, aemerson, cfe-commits Differential Revision: http://reviews.llvm.org/D8902 llvm-svn: 234661
* Workaround a performance issue with modules + PCHBen Langmuir2015-04-101-1/+4
| | | | | | | | | | | | More fallout from r228234; when looking up an identifier in a PCH that imports the Cocoa module on Darwin, it was taking 2 to 5 seconds because we were hammering the MapVector::erase() function, which is O(n). For now, just clear() the contained SmallVector to get back to 0.25 - 0.5 seconds. This is probably not the long-term fix, because without modules or without PCH the performance is more like 0.02 seconds. llvm-svn: 234655
* [Objective-C Sema] Fixes a typo which did not allow Fariborz Jahanian2015-04-107-10/+25
| | | | | | | bridge casting to super class of object's bridge type. rdar://18311183 llvm-svn: 234652
* [tblgen] Use StringRef::trimBenjamin Kramer2015-04-101-24/+5
| | | | llvm-svn: 234643
* Create the correct profiling symbol on NetBSD.Joerg Sonnenberger2015-04-102-4/+15
| | | | llvm-svn: 234636
* Create correct platform-specific target for NetBSD PPC64LE.Joerg Sonnenberger2015-04-101-0/+2
| | | | llvm-svn: 234629
* Don't eagerly typo-correct to a keyword if the next token is a right paren.Kaelyn Takata2015-04-103-2/+23
| | | | | | | | | Take advantage of the delayed typo no longer being eagerly corrected to a keyword to filter out keyword corrections (and other things like unresolved & overloaded expressions, which have placeholder types) when correcting typos inside of a decltype(). llvm-svn: 234623
* Testcase for the previous commit.Rafael Espindola2015-04-101-0/+7
| | | | | | Sorry, fogot to "git add" the previous time. llvm-svn: 234621
* Actually check if lseek works instead of using a filename based heuristic.Rafael Espindola2015-04-101-6/+6
| | | | llvm-svn: 234620
* [SEH] Add test for inline functions using SEH helpersReid Kleckner2015-04-101-0/+44
| | | | | | | Such helpers should always be comdat with the parent function and have internal linkage. llvm-svn: 234618
* Really fix exceptions-seh-finally.cReid Kleckner2015-04-101-1/+1
| | | | llvm-svn: 234616
* Try to fix exceptions-seh-finally.cReid Kleckner2015-04-101-2/+0
| | | | llvm-svn: 234614
* [SEH] Re-land r234532, but use internal linkage for all SEH helpersReid Kleckner2015-04-1010-371/+362
| | | | | | | | | | Even though these symbols are in a comdat group, the Microsoft linker really wants them to have internal linkage. I'm planning to tweak the mangling in a follow-up change. This is a straight revert with a 1-line fix. llvm-svn: 234613
* [Frontend] Close open file handles before renaming output filesReid Kleckner2015-04-101-10/+12
| | | | | | | | | | | | The placement of the 'delete' call that was removed in the unique_ptr migration in r234597 was not an accident. The raw_ostream has to be destroyed before you do the rename on Windows, otherwise you get ERROR_ACCESS_DENIED. We can still use unique_ptr, we just need to do a manual reset(). Also, range-for-loop-ify this code. llvm-svn: 234612
* Don't rely on implicit CallSite construction.Benjamin Kramer2015-04-101-1/+1
| | | | llvm-svn: 234600
* Try to make MSVC happy.Rafael Espindola2015-04-101-0/+3
| | | | llvm-svn: 234599
* Return std::unique_ptr to avoid a release and recreate.Rafael Espindola2015-04-102-5/+5
| | | | llvm-svn: 234598
OpenPOWER on IntegriCloud