summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Make matchers thread compatible, so we can pass them to different threads ↵Manuel Klimek2015-12-161-3/+4
| | | | | | and run them on multiple translation units in parallel. llvm-svn: 255773
* [x86] Exclusion of incorrect include headers paths for MCU targetAndrey Bokhanko2015-12-162-0/+8
| | | | | | | | Exclusion of /usr/include and /usr/local/include headers paths for MCU target. Differential Revision: http://reviews.llvm.org/D14954 llvm-svn: 255766
* clang-format: Extend header sort category implementation.Daniel Jasper2015-12-163-8/+18
| | | | | | | | | | Specifically, it is sometimes necessary to keep certain #includes as the first #include, even before the main #include for a .cc file. Switching the category to be signed instead of unsigned isn't ideal, but it seems as good of an option as any and is fully backwards compatible. llvm-svn: 255757
* [Objective-c] Fix a crash that occurs when ObjCTypeParamList::back() isAkira Hatanaka2015-12-162-1/+17
| | | | | | | | | | | | | | called on an empty list. This commit makes Parser::parseObjCTypeParamListOrProtocolRefs return nullptr if it sees an invalid type parameter (e.g., __kindof) in the type parameter list. rdar://problem/23068920 Differential Revision: http://reviews.llvm.org/D15463 llvm-svn: 255754
* [CodeGen] Use llvm::CmpInst::Predicate instead of unsigned for parameter ↵Craig Topper2015-12-161-18/+14
| | | | | | types in EmitCompare to eliminate some later explicit casts. NFC. llvm-svn: 255753
* Print qualified display names when emitting CodeViewReid Kleckner2015-12-166-23/+115
| | | | | | This is what debuggers expect. Words towards fixing PR21528. llvm-svn: 255744
* [CMake] Add support for generating profdata for clang from training filesChris Bieneman2015-12-167-0/+151
| | | | | | | | | | | | | | | | | | | | Summary: This patch adds support for using LIT to drive generating PGO profile data for clang. This first pass implementation should work on Linux and Unix based platforms. If you build clang using CMake with LLVM_BUILD_INSTRUMENTED=On the CMake build generates a generate-profdata target that will use the just-built clang to build any test files (see hello_world.cpp as an example). Each test compile will generate profraw files for each clang process. After all tests have run CMake will merge the profraw files using llvm-profdata. Future opportunities for extension: * Support for Build->Profile->Build bootstrapping * Support for linker order file generation using a similar mechanism and the same training data * Support for Windows Reviewers: dexonsmith, friss, bogner, cmatthews, vsk, silvas Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15462 llvm-svn: 255740
* [cfi] Exclude ubsan runtime library from non-diag CFI builds (driver changes).Evgeniy Stepanov2015-12-164-3/+10
| | | | | | | Split the CFI runtime in two: cfi and cfi_diag. The latter includes UBSan runtime to allow printing diagnostics. llvm-svn: 255736
* Reland "[SEH] Use llvm.x86.seh.recoverfp for SEH filters on x64 as well as ↵Reid Kleckner2015-12-163-24/+34
| | | | | | | | 32bit" I forgot to initialize RecoverFP. llvm-svn: 255731
* Revert "[SEH] Use llvm.x86.seh.recoverfp for SEH filters on x64 as well as ↵Reid Kleckner2015-12-163-29/+20
| | | | | | | | 32bit" This reverts commit r255710. llvm-svn: 255728
* Fix grammar.Richard Smith2015-12-161-1/+2
| | | | llvm-svn: 255727
* Update our claims about GCC's diagnostics quality to reflect recent ↵Richard Smith2015-12-161-6/+6
| | | | | | improvements to GCC. llvm-svn: 255726
* These days, GCC has at least minimal documentation for its VLAIS extension.Richard Smith2015-12-161-2/+2
| | | | llvm-svn: 255723
* Relax checks in cfi-cross-dso test.Evgeniy Stepanov2015-12-151-2/+2
| | | | | | The test is failing with unnamed labels. llvm-svn: 255712
* [SEH] Use llvm.x86.seh.recoverfp for SEH filters on x64 as well as 32bitReid Kleckner2015-12-153-20/+29
| | | | llvm-svn: 255710
* Cross-DSO control flow integrity (Clang part).Evgeniy Stepanov2015-12-1520-52/+489
| | | | | | | | | | | | | | Clang-side cross-DSO CFI. * Adds a command line flag -f[no-]sanitize-cfi-cross-dso. * Links a runtime library when enabled. * Emits __cfi_slowpath calls is bitset test fails. * Emits extra hash-based bitsets for external CFI checks. * Sets a module flag to enable __cfi_check generation during LTO. This mode does not yet support diagnostics. llvm-svn: 255694
* clang/test/CodeGen/ms_this.cpp: Fix for -Asserts.NAKAMURA Takumi2015-12-151-6/+12
| | | | llvm-svn: 255690
* Fix clang/test/CodeGen/ms_this.cpp.NAKAMURA Takumi2015-12-151-3/+1
| | | | llvm-svn: 255685
* [WinEH] Update clang to use operand bundles on call sitesDavid Majnemer2015-12-152-6/+37
| | | | | | | | | | | This updates clang to use bundle operands to associate an invoke with the funclet which it is contained within. Depends on D15517. Differential Revision: http://reviews.llvm.org/D15518 llvm-svn: 255675
* Unsupport test that should not be run on HexagonKrzysztof Parzyszek2015-12-151-0/+4
| | | | llvm-svn: 255667
* clang-cl: Add an alias for /wd4100Nico Weber2015-12-152-4/+7
| | | | llvm-svn: 255655
* [Microsoft][C++] Clang doesn't support a use of "this" pointer inside inline ↵Michael Zuckerman2015-12-151-1/+1
| | | | | | | | | | asm add triple to test Differential Revision: http://reviews.llvm.org/D15115 llvm-svn: 255647
* [Microsoft][C++] Clang doesn't support a use of "this" pointer inside inline asmMichael Zuckerman2015-12-153-12/+67
| | | | | | | | | | | | | | | | | | | | | Clang doesn’t support a use of “this” pointer inside inline asm. When I tried to compile a class or a struct (see example) with an inline asm that contains "this" pointer. Clang returns with an error. This patch fixes that. error: expected unqualified-id For example: ''' struct A { void f() { __asm mov eax, this // error: expected unqualified-id } }; ''' Differential Revision: http://reviews.llvm.org/D15115 llvm-svn: 255645
* [OPENMP 4.5] Fix test compatibility with 32 bit mode.Alexey Bataev2015-12-151-1/+1
| | | | llvm-svn: 255640
* [OPENMP 4.5] Codegen for 'hint' clause of 'critical' directiveAlexey Bataev2015-12-154-15/+48
| | | | | | OpenMP 4.5 defines 'hint' clause for 'critical' directive. Patch adds codegen for this clause. llvm-svn: 255639
* clang/test/Analysis/padding_c.c: Suppress a test incompatible to i686-linux.NAKAMURA Takumi2015-12-151-7/+0
| | | | | | | | error: 'warning' diagnostics expected but not seen: File clang/test/Analysis/padding_c.c Line 194 (directive at clang/test/Analysis/padding_c.c:193): Excessive padding in 'struct DefaultAttrAlign' 1 error generated. llvm-svn: 255636
* [libclang] Add a flag to create the precompiled preamble on the first parse.Benjamin Kramer2015-12-157-29/+70
| | | | | | | | | | | | | | | | | | | | | Summary: The current default is to create the preamble on the first reparse, aka second parse. This is useful for clients that do not want to block when opening a file because serializing the preamble takes a bit of time. However, this makes the reparse much more expensive and that may be on the critical path as it's the first interaction a user has with the source code. YouCompleteMe currently optimizes for the first code interaction by parsing the file twice when loaded. That's just unnecessarily slow and this flag helps to avoid that. Reviewers: doug.gregor, klimek Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15490 llvm-svn: 255635
* Add a new matcher to match character types.Gabor Horvath2015-12-152-0/+22
| | | | llvm-svn: 255627
* [OPENMP 4.5] Parsing/sema for 'hint' clause of 'critical' directive.Alexey Bataev2015-12-1519-37/+369
| | | | | | OpenMP 4.5 adds 'hint' clause to critical directive. Patch adds parsing/semantic analysis for this clause. llvm-svn: 255625
* [PGO] make profile prefix even shorter and more readableXinliang David Li2015-12-1517-65/+65
| | | | llvm-svn: 255587
* [PGO] Shorten profile symbol prefixesXinliang David Li2015-12-1417-65/+65
| | | | | | | | | | (test case update) Profile symbols have long prefixes which waste space and creating pressure for linker. This patch shortens the prefixes to minimal length without losing verbosity. Differential Revision: http://reviews.llvm.org/D15503 llvm-svn: 255576
* Update for llvm api change.Rafael Espindola2015-12-141-33/+27
| | | | llvm-svn: 255572
* [Sema] Make nullness warnings appear in C++.George Burgess IV2015-12-145-13/+61
| | | | | | | | | | | | | | | | | | | Given the following code: int *_Nullable ptr; int *_Nonnull nn = ptr; ...In C, clang will warn you about `nn = ptr`, because you're assigning a nonnull pointer to a nullable pointer. In C++, clang issues no such warning. This patch helps ensure that clang doesn't ever miss an opportunity to complain about C++ code. N.B. Though this patch has a differential revision link, the actual review took place over email. Differential Revision: http://reviews.llvm.org/D14938 llvm-svn: 255556
* Reordering fields to reduce padding in Clang. NFCBen Craig2015-12-142-11/+11
| | | | llvm-svn: 255552
* [PATCH] Adding checker to detect excess padding in recordsBen Craig2015-12-146-0/+959
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The intent of this checker is to generate a report for any class / structure that could reduce its padding by reordering the fields. This results in a very noisy checker. To reduce the noise, this checker will currently only warn when the number of bytes over "optimal" is more than 24. This value is configurable with -analyzer-config performance.Padding:AllowedPad=N. Small values of AllowedPad have the potential to generate hundreds of reports, and gigabytes of HTML reports. The checker searches for padding violations in two main ways. First, it goes record by record. A report is generated if the fields could be reordered in a way that reduces the padding by more than AllowedPad bytes. Second, the checker will generate a report if an array will cause more than AllowedPad padding bytes to be generated. The record checker currently skips many ABI specific cases. Classes with base classes are skipped because base class tail padding is ABI specific. Bitfields are just plain hard, and duplicating that code seems like a bad idea. VLAs are both uncommon and non-trivial to fix. The array checker isn't very thorough right now. It only checks to see if the element type's fields could be reordered, and it doesn't recursively check to see if any of the fields' fields could be reordered. At some point in the future, it would be nice if "arrays" could also look at array new usages and malloc patterns that appear to be creating arrays. llvm-svn: 255545
* [PowerPC] Fix test/CodeGen/ppc-sfvarargsPetar Jovanovic2015-12-141-1/+1
| | | | | | | | | The issue seems to be that .ll file may either use number of register value or alias %numUsedRegs, so the check needs to cover both cases. This will hopefully fix the last regression introduced by r255515. llvm-svn: 255539
* [PowerPC] Fix make-check issuesPetar Jovanovic2015-12-142-7/+7
| | | | | | | Previous change r255515 introduced a couple of issues likely caused by a different configure setup. llvm-svn: 255533
* Allow pseudo-destructor calls on forward-declared Objective-C class pointers.John McCall2015-12-142-1/+29
| | | | | | rdar://18522255 llvm-svn: 255531
* clang-cl: make /Wall turn on both -Wall and -Wextra (PR25563)Hans Wennborg2015-12-142-2/+2
| | | | | | | | The documentation suggests /Wall should really turn on -Wextra and any other warnings that are not enabled by default. That would correspond to Clang's -Weverything, but is probably not what users want. llvm-svn: 255524
* [MS ABI] Don't rely on terminatepadDavid Majnemer2015-12-143-10/+11
| | | | | | | | | | | | | | | We'd like to remove support for terminatepad from LLVM. To do this, we need to move Clang off of it first. The intent behind terminatepad was to carefully model exception specifications for the MSVC personality. However, we don't support exception specifications for the MSVC personality and neither does MSVC. Instead, MSVC supports all-or-nothing exception specifications. We can model this limited usage using cleanuppads which call std::terminate. Differential Revision: http://reviews.llvm.org/D15478 llvm-svn: 255521
* [Power PC] add soft float support for ppc32Petar Jovanovic2015-12-145-11/+144
| | | | | | | | | | | | This patch enables soft float support for ppc32 architecture and fixes the ABI for variadic functions. This is the first in a set of patches for soft float support in LLVM. Patch by Strahinja Petrovic. Differential Revision: http://reviews.llvm.org/D13351 llvm-svn: 255515
* [Hexagon] Xfail two tests that fail due to over-aligning arraysKrzysztof Parzyszek2015-12-142-0/+9
| | | | llvm-svn: 255510
* [Hexagon] Update default paths and argumentsKrzysztof Parzyszek2015-12-1416-1326/+679
| | | | | | | | | - Removed support for hexagonv3 and earlier. - Added handling of hexagonv55 and hexagonv60. - Added handling of target features (hvx, hvx-double). - Updated paths to reflect current directory layout. llvm-svn: 255502
* Add parse and sema of OpenMP distribute directive with all clauses except ↵Carlo Bertolli2015-12-1429-23/+1457
| | | | | | dist_schedule llvm-svn: 255498
* [OPENMP] Fix debug info for 'atomic' construct.Alexey Bataev2015-12-142-5/+6
| | | | | | Debug info for statement under 'atomic' construct must point exactly to that statement, not the directive itself. llvm-svn: 255487
* clang-format: Add test for AlignAfterOpenBracket = AlwaysBreak in C++.Daniel Jasper2015-12-141-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revision 251405 added AlwaysBreak to support Google's JavaScript style. This changeset complete existing AlignsAfterOpenBracket tests to exercise AlwaysBreak for C++. I thought this would be worthwhile. With this option we can support request from http://lists.llvm.org/pipermail/cfe-dev/2015-May/042942.html, that had been requested a few times. This also partially solve related Bug 23422 and is probably sufficient for most people. AlignAfterOpenBracket = FormatStyle::BAS_AlwaysBreak; BinPackArguments = false; BinPackParameters = false; With these setting we obtain this formatting: void fooWithAVeryLongParamList( int firstParameter, int secondParameter int lastParameter) { object.alsoThisDoenstFitSoIBreakImmidiatly( firstParameter, secondParameter, lastParameter); } Patch by Jean-Philippe Dufraigne, thank you. llvm-svn: 255486
* clang-format: Extend Linux-brace-wrapping test.Daniel Jasper2015-12-141-0/+2
| | | | llvm-svn: 255485
* clang-format: Fix style default for WebKit and Linux styles.Daniel Jasper2015-12-141-2/+0
| | | | | | | | Brought up in codereviews: http://reviews.llvm.org/D15445 http://reviews.llvm.org/D15485 llvm-svn: 255484
* [Sema] Add -Wparentheses warnings for '^' in '|' expressions and '&' in '^' ↵Craig Topper2015-12-133-26/+41
| | | | | | expressions to compliment '&' in '|' that is already present. Matches gcc behavior. llvm-svn: 255450
* [Sema] Write some checks for groups of BinaryOperatorKinds in terms of the ↵Craig Topper2015-12-132-7/+8
| | | | | | predicates already available in BinaryOperator. NFC llvm-svn: 255449
OpenPOWER on IntegriCloud