Permalink
Commits on Apr 28, 2017
  1. [ASTImporter] Move structural equivalence context to its own file. NFCI

    Create a header and impl file for the structural equivalence context.
    This is to allow other users outside clang importer. NFCI
    
    Differential Revision: https://reviews.llvm.org/D31777
    
    rdar://problem/30167717
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301604 91177308-0d34-0410-b5e6-96231b3b80d8
    bcardosolopes committed Apr 28, 2017
  2. [ARCMigrate] When applying changes from remap files, disable the 'adj…

    …ustRemovals' functionality of EditedSource
    
    'adjustRemovals' is used to avoid situation when removing a range inadvertently causes 2 separate identifiers to get joined into one.
    But it is not useful when the edits are character precise, as is the case with the remap files.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301602 91177308-0d34-0410-b5e6-96231b3b80d8
    akyrtzi committed Apr 28, 2017
Commits on Apr 27, 2017
  1. Use a consistent style. NFC

    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301601 91177308-0d34-0410-b5e6-96231b3b80d8
    gburgessiv committed Apr 27, 2017
  2. [Modules] Improve diagnostics for incomplete umbrella

    One of the -Wincomplete-umbrella warnings diagnoses when a header is present in
    the directory but it's not present in the umbrella header. Currently, this
    warning only happens on top level modules; any submodule using an umbrella
    header does not get this warning. Fix that by also considering the submodules.
    
    Differential Revision: https://reviews.llvm.org/D32576
    
    rdar://problem/22623686
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301597 91177308-0d34-0410-b5e6-96231b3b80d8
    bcardosolopes committed Apr 27, 2017
  3. Headers: Make the type of SIZE_MAX the same as size_t

    size_t is usually defined as unsigned long, but on 64-bit platforms,
    stdint.h currently defines SIZE_MAX using "ull" (unsigned long long).
    Although this is the same width, it doesn't necessarily have the same
    alignment or calling convention.  It also triggers printf warnings when
    using the format flag "%zu" to print SIZE_MAX.
    
    This changes SIZE_MAX to reuse the compiler-provided __SIZE_MAX__, and
    provides similar fixes for the other integers:
    
      - INTPTR_MIN
      - INTPTR_MAX
      - UINTPTR_MAX
      - PTRDIFF_MIN
      - PTRDIFF_MAX
      - INTMAX_MIN
      - INTMAX_MAX
      - UINTMAX_MAX
      - INTMAX_C()
      - UINTMAX_C()
    
    ... and fixes the typedefs for intptr_t and uintptr_t to use
    __INTPTR_TYPE__ and __UINTPTR_TYPE__ instead of int32_t, effectively
    reverting r89224, r89226, and r89237 (r89221 already having been
    effectively reverted).
    
    We can probably also kill __INTPTR_WIDTH__, __INTMAX_WIDTH__, and
    __UINTMAX_WIDTH__ in a follow-up, but I was hesitant to delete all the
    per-target CHECK lines in this commit since those might serve their own
    purpose.
    
    rdar://problem/11811377
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301593 91177308-0d34-0410-b5e6-96231b3b80d8
    dexonsmith committed Apr 27, 2017
  4. Preprocessor: Suppress -Wnonportable-include-path for header maps

    If a file search involves a header map, suppress
    -Wnonportable-include-path.  It's firing lots of false positives for
    framework authors internally, and it's not trivial to fix.
    
    Consider a framework called "Foo" with a main (installed) framework header
    "Foo/Foo.h".  It's atypical for "Foo.h" to actually live inside a
    directory called "Foo" in the source repository.  Instead, the
    build system generates a header map while building the framework.
    If Foo.h lives at the top-level of the source repository (common), and
    the git repo is called ssh://some.url/foo.git, then the header map will
    have something like:
    
        Foo/Foo.h -> /Users/myname/code/foo/Foo.h
    
    where "/Users/myname/code/foo" is the clone of ssh://some.url/foo.git.
    
    After #import <Foo/Foo.h>, the current implementation of
    -Wnonportable-include-path will falsely assume that Foo.h was found in a
    nonportable way, because of the name of the git clone (.../foo/Foo.h).
    However, that directory name was not involved in the header search at
    all.
    
    This commit adds an extra parameter to Preprocessor::LookupFile and
    HeaderSearch::LookupFile to track if the search used a header map,
    making it easy to suppress the warning.  Longer term, once we find a way
    to avoid the false positive, we should turn the warning back on.
    
    rdar://problem/28863903
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301592 91177308-0d34-0410-b5e6-96231b3b80d8
    dexonsmith committed Apr 27, 2017
  5. libclang: remove unused variable.

    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301585 91177308-0d34-0410-b5e6-96231b3b80d8
    TNorthover committed Apr 27, 2017
  6. Added an Importer test for in-class member initializers.

    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301573 91177308-0d34-0410-b5e6-96231b3b80d8
    scallanan committed Apr 27, 2017
  7. [Profile] Add off-by-default -Wprofile-instr-missing warning

    Clang warns that a profile is out-of-date if it can't find a profile
    record for any function in a TU. This warning became noisy after llvm
    started allowing dead-stripping of instrumented functions.
    
    To fix this, this patch changes the existing profile out-of-date warning
    (-Wprofile-instr-out-of-date) so that it only complains about mismatched
    data. Further, it introduces a new, off-by-default warning about missing
    function data (-Wprofile-instr-missing).
    
    Differential Revision: https://reviews.llvm.org/D28867
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301570 91177308-0d34-0410-b5e6-96231b3b80d8
    vedantk committed Apr 27, 2017
  8. [libclang] Enhance clang_Cursor_isDynamicCall and clang_Cursor_getRec…

    …eiverType to handle ObjC property references
    
    Also enhance clang_Cursor_getReceiverType to handle C++ method calls.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301568 91177308-0d34-0410-b5e6-96231b3b80d8
    akyrtzi committed Apr 27, 2017
  9. clang-cl: Alias /d1reportAllClassLayout to -fdump-record-layouts (PR3…

    …2826)
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301567 91177308-0d34-0410-b5e6-96231b3b80d8
    zmodem committed Apr 27, 2017
  10. Fix -Wpedantic about extra semicolons in CGStmtOpenMP.cpp

    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301564 91177308-0d34-0410-b5e6-96231b3b80d8
    zmodem committed Apr 27, 2017
  11. Remove leaking UnknownPragmaHandlers right after we are done with them.

    The UnknownPragmaHandlers added by DoPrintPreprocessedInput conflict with the
    real PragmaHandlers from clang::Parser because they try to handle the same
    #pragma directives. This makes it impossible to use a Preprocessor (that was
    previously passed to DoPrintPreprocessedInput), as an Preprocessor for a
    clang::Parser instance which is what we currently do in cling.
    
    This patch removes the added UnknownPragmaHandler to avoid conflicts these
    conflicts and leave the PragmaHandlers of the Preprocessors in a the same state
    as before calling DoPrintPreprocessedInput.
    
    Patch by Raphael Isemann (D32486)!
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301563 91177308-0d34-0410-b5e6-96231b3b80d8
    vgvassilev committed Apr 27, 2017
  12. [OPENMP] Add a check for iterator not reached the end of stack, NFC.

    Add an extra check for the iterator during checks of the data-sharing
    attributes.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301549 91177308-0d34-0410-b5e6-96231b3b80d8
    alexey-bataev committed Apr 27, 2017
  13. [index] Mark the ObjC implicit accessor method definitions as 'dynami…

    …c' as well
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301548 91177308-0d34-0410-b5e6-96231b3b80d8
    akyrtzi committed Apr 27, 2017
  14. [OPENMP] Improve performance of the hasDSA() function, NFC.

    Remove some unneccesary code from the function after the fix for ASAN
    buildbots.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301547 91177308-0d34-0410-b5e6-96231b3b80d8
    alexey-bataev committed Apr 27, 2017
  15. [libclang] Pass in the -fallow-editor-placeholders option

    This will suppress any live diagnostics caused by editor placeholders in Xcode.
    
    rdar://31833579
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301542 91177308-0d34-0410-b5e6-96231b3b80d8
    hyp committed Apr 27, 2017
  16. clang/test/Modules/malformed-overload.m: Make sure module cache is cl…

    …ean.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301539 91177308-0d34-0410-b5e6-96231b3b80d8
    chapuni committed Apr 27, 2017
  17. clang-format: [JS] parse async function declarations.

    Summary:
    Previously, clang-format would accidentally parse an async function
    declaration as a function expression, and thus not insert an unwrapped
    line for async functions, causing subsequent functions to run into the
    function:
    
        async function f() {
          x();
        } function g() { ...
    
    With this change, async functions get parsed as top level function
    declarations and get their own unwrapped line context.
    
    Reviewers: djasper
    
    Subscribers: klimek, cfe-commits
    
    Differential Revision: https://reviews.llvm.org/D32590
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301538 91177308-0d34-0410-b5e6-96231b3b80d8
    mprobst committed Apr 27, 2017
  18. Fix asan failures on OpenMP.

    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301536 91177308-0d34-0410-b5e6-96231b3b80d8
    hokein committed Apr 27, 2017
  19. [X86] Support of no_caller_saved_registers attribute

    Implements the Clang part for no_caller_saved_registers attribute as appears here: 
    https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=5ed3cc7b66af4758f7849ed6f65f4365be8223be.
    
    Differential Revision: https://reviews.llvm.org/D31871
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301535 91177308-0d34-0410-b5e6-96231b3b80d8
    Oren Ben Simhon committed Apr 27, 2017
  20. [ObjC] Disallow vector parameters and return values in Objective-C me…

    …thods
    
    for iOS < 9 and OS X < 10.11 X86 targets
    
    This commit adds a new error that disallows methods that have parameters/return
    values with a vector type for some older X86 targets. This diagnostic is
    needed because objc_msgSend doesn't support SIMD vector registers/return values
    on X86 in iOS < 9 and OS X < 10.11. Note that we don't necessarily know if the
    vector argument/return value will use a SIMD register, so instead we chose to
    be conservative and prohibit all vector types.
    
    rdar://21662309
    
    Differential Revision: https://reviews.llvm.org/D28670
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301532 91177308-0d34-0410-b5e6-96231b3b80d8
    hyp committed Apr 27, 2017
  21. Don't hard-code "modules-cache-path" in the test.

    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301525 91177308-0d34-0410-b5e6-96231b3b80d8
    hokein committed Apr 27, 2017
  22. In the expression evaluator, visit the index of an ArraySubscriptExpr…

    … even if we can't evaluate the base, if the evaluation mode tells us to continue evaluation.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301522 91177308-0d34-0410-b5e6-96231b3b80d8
    nlewycky committed Apr 27, 2017
  23. In the expression evaluator, descend into both the true and false exp…

    …ressions of a ConditionalOperator when the condition can't be evaluated and we're in an evaluation mode that says we should continue evaluating.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301520 91177308-0d34-0410-b5e6-96231b3b80d8
    nlewycky committed Apr 27, 2017
  24. Darwin: Define __STDC_NO_THREADS__ on Darwin targets

    Darwin doesn't support C11 threads.h.  Define `__STDC_NO_THREADS__` so
    that users can check for it.
    
    rdar://problem/18461003
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301508 91177308-0d34-0410-b5e6-96231b3b80d8
    dexonsmith committed Apr 27, 2017
  25. Improve diagnostics for bad -std= flag.

    Don't list deprecated -std= values (c++0x etc). Only produce one line of output
    per standard, even if we know it by multiple names.
    
    In passing, add missing -std=gnu++03 alias (supported by GCC), and add new
    spelling '-std=cl1.0' for OpenCL 1.0 for consistency with the other values,
    with the same meaning as the preexisting '-std=cl'.
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301507 91177308-0d34-0410-b5e6-96231b3b80d8
    zygoloid committed Apr 27, 2017
Commits on Apr 26, 2017
  1. Remove unnecessary and somewhat inaccurate "C89" flag from language s…

    …tandards.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301500 91177308-0d34-0410-b5e6-96231b3b80d8
    zygoloid committed Apr 26, 2017
  2. Don't accept -std= values that would switch us to a different source …

    …language.
    
    We already prohibited this in most cases (in r130710), but had some bugs in our
    enforcement of this rule. Specifically, this prevents the following
    combinations:
    
     * -x c -std=clN.M, which would previously effectively act as if -x cl were
       used, despite the input being a C source file. (-x cl -std=cNN continues
       to be disallowed.)
    
     * -x c++ -std=cuda, which would previously select C++98 + CUDA, despite that
       not being a C++ standard. (-x cuda -std=c++NN is still permitted, and
       selects CUDA with the given C++ standard as its base language.
       -x cuda -std=cuda is still supported with the meaning of CUDA + C++98.)
    
     * -x renderscript -std=c++NN, which would previously form a hybrid "C++ with
       RenderScript extensions" language. We could support such a thing, but
       shouldn't do so by accident.
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301497 91177308-0d34-0410-b5e6-96231b3b80d8
    zygoloid committed Apr 26, 2017
  3. Revert r301487: Replace HashString algorithm with xxHash64

    This reverts commit r301487 to make buildbots green.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301491 91177308-0d34-0410-b5e6-96231b3b80d8
    rui314 committed Apr 26, 2017
  4. Replace HashString algorithm with xxHash64

    The previous algorithm processed one character at a time, which is very
    painful on a modern CPU. Replace it with xxHash64, which both already
    exists in the codebase and is fairly fast.
    
    Patch from Scott Smith!
    
    Differential Revision: https://reviews.llvm.org/D32509
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301487 91177308-0d34-0410-b5e6-96231b3b80d8
    rui314 committed Apr 26, 2017
  5. Fix comment. NFC

    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301486 91177308-0d34-0410-b5e6-96231b3b80d8
    gburgessiv committed Apr 26, 2017