Permalink
Commits on Sep 26, 2016
  1. P0145R3 (C++17 evaluation order tweaks): evaluate the base expression…

    … before
    
    the pointer-to-member expression in calls through .* and ->* expressions.
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282457 91177308-0d34-0410-b5e6-96231b3b80d8
    zygoloid committed Sep 26, 2016
  2. P0145R3 (C++17 evaluation order tweaks): consistently emit the LHS of…

    … array
    
    subscripting before the RHS, regardless of which is the base and which is the
    index.
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282453 91177308-0d34-0410-b5e6-96231b3b80d8
    zygoloid committed Sep 26, 2016
  3. [clang-format] Don't allow newline after uppercase Obj-C block return…

    … types
    
    Fixes the following:
      BOOL (^aaa)(void) = ^BOOL {
      };
    
    The first BOOL's token was getting set to TT_FunctionAnnotationRParen
    incorrectly, which was causing an unexpected newline after (^aaa). This
    was introduced in r245846.
    
    Patch by Kent Sutherland, thank you!
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282448 91177308-0d34-0410-b5e6-96231b3b80d8
    djasper committed Sep 26, 2016
  4. headers: add missing Windows ARM Interlocked intrinsics

    On ARM, there are multiple versions of each of the intrinsics, with
    acquire/relaxed/release barrier semantics.
    
    The newly added ones are provided as inline functions here instead of builtins,
    since they should only be available on certain archs (arm/aarch64).
    
    This is necessary in order to compile C++ code for ARM in MSVC mode.
    
    Patch by Martin Storsjö!
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282447 91177308-0d34-0410-b5e6-96231b3b80d8
    compnerd committed Sep 26, 2016
  5. Fix test on windows

    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282438 91177308-0d34-0410-b5e6-96231b3b80d8
    MatzeB committed Sep 26, 2016
  6. CC1: Add -save-stats option

    This option behaves in a similar spirit as -save-temps and writes
    internal llvm statistics in json format to a file.
    
    Differential Revision: https://reviews.llvm.org/D24820
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282426 91177308-0d34-0410-b5e6-96231b3b80d8
    MatzeB committed Sep 26, 2016
  7. Complete support for the cxxCtorInitializer() AST matcher so that it …

    …can be used as a top-level matcher.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282417 91177308-0d34-0410-b5e6-96231b3b80d8
    AaronBallman committed Sep 26, 2016
  8. [ASTMatcher] Add isStaticStorageClass matcher for varDecl and functio…

    …nDecl.
    
    Reviewers: klimek
    
    Subscribers: cfe-commits, klimek
    
    Differential Revision: https://reviews.llvm.org/D24821
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282415 91177308-0d34-0410-b5e6-96231b3b80d8
    hokein committed Sep 26, 2016
  9. [analyzer] Improve CastToStruct checker so it can also detect widenin…

    …g casts of struct data
    
    Example:
    
    struct AB {
      int A;
      int B;
    };
    
    struct ABC {
      int A;
      int B;
      int C;
    };
    
    void f() {
      struct AB Data;
      struct ABC *P = (struct ABC *)&Data;
    }
    
    Differential Revision: https://reviews.llvm.org/D23508
    
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282411 91177308-0d34-0410-b5e6-96231b3b80d8
    Daniel Marjamaki committed Sep 26, 2016
  10. clang-format: Only special-case top-level */& in multivar-declstmts.

    Before (even with PointerAlignment: Left):
      vector<int *> a, b;
    
    After:
      vector<int*> a, b;
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282410 91177308-0d34-0410-b5e6-96231b3b80d8
    djasper committed Sep 26, 2016
  11. update the link to the code coverage

    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282400 91177308-0d34-0410-b5e6-96231b3b80d8
    sylvestre committed Sep 26, 2016
  12. Driver: avoid failing in the backend

    Avoid failing in the backend when the rewrite map does not exist.  Rather check
    that the map exists in the frontend before handing it off to the backend.  Add
    the missing rewrite maps that the tests were referencing.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282379 91177308-0d34-0410-b5e6-96231b3b80d8
    compnerd committed Sep 26, 2016
  13. [AMDGPU] Expose flat work group size, register and wave control attri…

    …butes
    
    __attribute__((amdgpu_flat_work_group_size(<min>, <max>))) - request minimum and maximum flat work group size
    __attribute__((amdgpu_waves_per_eu(<min>[, <max>]))) - request minimum and/or maximum waves per execution unit
    
    Differential Revision: https://reviews.llvm.org/D24513
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282371 91177308-0d34-0410-b5e6-96231b3b80d8
    kzhuravl committed Sep 26, 2016
Commits on Sep 24, 2016
  1. Remove excessive padding from RedeclarableResult

    This diff reorders the fields of the class RedeclarableResult 
    to remove excessive padding.
    
    Test plan: make -j8 check-clang
    
    Differential revision: https://reviews.llvm.org/D24754
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282322 91177308-0d34-0410-b5e6-96231b3b80d8
    alexshap committed Sep 24, 2016
  2. Remove excessive padding from ObjCCategoriesVisitor

    This diff reorders the fields of ObjCCategoriesVisitor 
    to remove excessive padding. 
    
    Test plan: make -j8 check-clang
    
    Differential revision: https://reviews.llvm.org/D24753
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282318 91177308-0d34-0410-b5e6-96231b3b80d8
    alexshap committed Sep 24, 2016
  3. [analyzer][scan-build-py] subprocess output handling reviewed in clan…

    …g module
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282317 91177308-0d34-0410-b5e6-96231b3b80d8
    Laszlo Nagy committed Sep 24, 2016
Commits on Sep 23, 2016
  1. Use llvm::to_string instead of std::to_string to fix bot

    This should fix the android build in this bot:
    http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-buildserver/builds/11143
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282308 91177308-0d34-0410-b5e6-96231b3b80d8
    Teresa Johnson committed Sep 23, 2016
  2. Update clang for r282299.

    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282301 91177308-0d34-0410-b5e6-96231b3b80d8
    pcc committed Sep 23, 2016
  3. [analyzer] Fix crash in RetainCountChecker::checkEndFunction

    The class BodyFarm creates bodies for
    OSAtomicCompareAndSwap*, objc_atomicCompareAndSwap*, dispatch_sync*, dispatch_once*
    and for them the flag isBodyAutosynthesized is set to true.
    
    This diff
    1. makes AnalysisConsumer::HandleCode skip the autosynthesized code
    2. replaces assert(LCtx->getParent()) in RetainCountChecker::checkEndFunction
    by assert(!LCtx->inTopFrame()) (minor cleanup)
    
    Test plan: make -j8 check-clang-analysis
    
    Differential revision: https://reviews.llvm.org/D24792
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282293 91177308-0d34-0410-b5e6-96231b3b80d8
    alexshap committed Sep 23, 2016
  4. [LTO] Add -flto-jobs=N to control backend parallelism

    Summary:
    Currently, a linker option must be used to control the backend
    parallelism of ThinLTO. The linker option varies depending on the
    linker (e.g. gold vs ld64). Add a new clang option -flto-jobs=N
    to control this.
    
    I've added in the wiring to pass this to the gold plugin. I also
    added in the logic to pass this down in the form I understand that
    ld64 uses on MacOS, for the darwin target.
    
    Reviewers: mehdi_amini, dexonsmith
    
    Subscribers: mehdi_amini, cfe-commits
    
    Differential Revision: https://reviews.llvm.org/D24826
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282291 91177308-0d34-0410-b5e6-96231b3b80d8
    Teresa Johnson committed Sep 23, 2016
  5. Revert "set the underlying value of “#pragma STDC FP_CONTRACT” on by …

    …default"
    
    This reverts commit r282259, as it broke the AArch64 test-suite bots.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282289 91177308-0d34-0410-b5e6-96231b3b80d8
    rengolin committed Sep 23, 2016
  6. set the underlying value of “#pragma STDC FP_CONTRACT” on by default

    Clang has the default FP contraction setting of “-ffp-contract=on”, which
    doesn't really mean “on” in the conventional sense of the word, but rather
    really means “according to the per-statement effective value of the relevant
    pragma”.
    
    Before this patch, Clang has that pragma defaulting to “off”. Since the
    “-ffp-contract=on” mode is really an AND of two booleans and the second of them
    defaults to “off”, the whole thing effectively defaults to “off”. This patch
    changes the default value of the pragma to “on”, thus making the default pair of
    booleans (on, on) rather than (on, off). This makes FP optimization slightly
    more aggressive than before when not using either “-Ofast”, “-ffast-math”, or
    “-ffp-contract=fast”. Even with this patch the compiler still respects
    “-ffp-contract=off”.
    
    As per a suggestion by Steve Canon, the added code does _not_ require “-O3” or
    higher. This is so as to try our best to preserve identical floating-point
    results for unchanged source code compiling for an unchanged target when only
    changing from any optimization level in the set (“-O0”, “-O1”, “-O2”, “-O3”) to
    any other optimization level in that set. “-Os” and “-Oz” seem to be behaving
    identically, i.e. should probably be considered a part of the aforementioned
    set, but I have not reviewed this rigorously. “-Ofast” is explicitly _not_ a
    member of that set.
    
    Patch authored by Abe Skolnik [a.skolnik@samsung.com] and Stephen Canon [scanon@apple.com].
    
    Differential Revision: https://reviews.llvm.org/D24481
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282259 91177308-0d34-0410-b5e6-96231b3b80d8
    sebpop committed Sep 23, 2016
  7. Revert of r282255 because of "Fell off the end of a string-switch" bu…

    …ildbot
    
    failures.
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282257 91177308-0d34-0410-b5e6-96231b3b80d8
    Sjoerd Meijer committed Sep 23, 2016
  8. Fix for r280064 that added options for fp denormals and exceptions.

    These options were forgotten to be copied in setCommandLineOpts.
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282255 91177308-0d34-0410-b5e6-96231b3b80d8
    Sjoerd Meijer committed Sep 23, 2016
  9. [clang-format] support header deletion in cleanupAroundReplacemnts.

    Summary:
    - If a replacement has offset UINT_MAX, length 0, and a replacement text
      that is an #include directive, this will insert the #include into the
      correct block in the \p Code.
    - If a replacement has offset UINT_MAX, length 1, and a replacement text
      that is the name of the header to be removed, the header will be removed
      from \p Code if it exists.
    
    Reviewers: djasper
    
    Subscribers: cfe-commits, klimek
    
    Differential Revision: https://reviews.llvm.org/D24829
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282253 91177308-0d34-0410-b5e6-96231b3b80d8
    Eric Liu committed Sep 23, 2016
  10. [OpenCL] Augment pipe built-ins with pipe packet size and alignment.

    Reviewers: Anastasia, vpykhtin
    
    Subscribers: dmitry, cfe-commits
    
    Differential Revision: https://reviews.llvm.org/D23992
    
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282252 91177308-0d34-0410-b5e6-96231b3b80d8
    bader committed Sep 23, 2016
  11. [asan] Fix incorrect SEH symbol mangling on win64.

    Summary:
    The ASAN unittests are failing (check-asan-dynamic) due to an incorrect symbol name:
    ```
    LINK : error LNK2001: unresolved external symbol ___asan_seh_interceptor
    ```
    
    On win64, the linker is not adding an extra underscore. This was correctly fixed in the same file for other uses.
    
    After that patch, most of the unittests are passing, but some related to SEH needs to be fixed.
    ```
    Failing Tests (4):
        AddressSanitizer-x86_64-windows-dynamic :: TestCases/Windows/dll_intercept_memchr.cc
        AddressSanitizer-x86_64-windows-dynamic :: TestCases/Windows/dll_intercept_memcpy_indirect.cc
        AddressSanitizer-x86_64-windows-dynamic :: TestCases/Windows/dll_seh.cc
        AddressSanitizer-x86_64-windows-dynamic :: TestCases/Windows/seh.cc
    
      Expected Passes    : 339
      Passes With Retry  : 3
      Expected Failures  : 16
      Unsupported Tests  : 152
      Unexpected Failures: 4
    ```
    
    Reviewers: rnk, kcc, majnemer
    
    Subscribers: majnemer, chrisha, cfe-commits
    
    Differential Revision: https://reviews.llvm.org/D24841
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282251 91177308-0d34-0410-b5e6-96231b3b80d8
    bergeret committed Sep 23, 2016
  12. Minor tweak. Avoid hardcoding.

    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282242 91177308-0d34-0410-b5e6-96231b3b80d8
    Daniel Marjamaki committed Sep 23, 2016
  13. Fix indentation

    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282233 91177308-0d34-0410-b5e6-96231b3b80d8
    Daniel Marjamaki committed Sep 23, 2016
  14. [AVX-512] Add initial support for checking rounding mode arguments of…

    … builtins.
    
    The backend can't encode all possible values of the argument and will fail isel. Checking in the frontend presents a friendlier experience to the user.
    
    I started with builtins that can only take _MM_CUR_DIRECTION or _MM_NO_EXC. More builtins coming in the future.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282228 91177308-0d34-0410-b5e6-96231b3b80d8
    Craig Topper committed Sep 23, 2016
  15. [X86] Split up the single switch statement in Sema::CheckX86BuiltinFu…

    …nctionCall into different switches or ifs for each type of check.
    
    This in preparation for a new check that will check some of the builtins that already had the immediate range check.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282227 91177308-0d34-0410-b5e6-96231b3b80d8
    Craig Topper committed Sep 23, 2016
Commits on Sep 22, 2016
  1. [OpenBSD] Add type sign information for OpenBSD

    Like NetBSD, OpenBSD prefers having a consistent set of typedefs
    across the architectures it supports over strictly following the ARM
    ABIs.  The diff below makes sure that clang's view of those types
    matches OpenBSD's system header files.  It also adds a test that
    checks the relevant types on all OpenBSD platforms that clang works
    on.  Hopefully we can add mips64 and powerpc to that list in the
    future.
    
    Patch by Mark Kettenis <mark.kettenis@xs4all.nl>
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282184 91177308-0d34-0410-b5e6-96231b3b80d8
    rengolin committed Sep 22, 2016
  2. [docs] Touch up the coverage docs some more

    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282169 91177308-0d34-0410-b5e6-96231b3b80d8
    vedantk committed Sep 22, 2016