Permalink
Commits on Dec 30, 2012
  1. Don't warn on unused member functions that are extern because of a ty…

    …pedef.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171267 91177308-0d34-0410-b5e6-96231b3b80d8
    espindola committed Dec 30, 2012
  2. Formatter: parse and format inline namespaces like regular namespaces

    This changes formatting from:
    
    inline namespace X {
      class A {
      };
    }
    
    to:
    
    inline namespace X {
    class A {
    };
    }
    
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171266 91177308-0d34-0410-b5e6-96231b3b80d8
    gribozavr committed Dec 30, 2012
  3. Comment lexing: replace manual comparison with StringRef::find_first_of

    This gives an about 1.8% improvement on Clang bootstrap with -Wdocumentation
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171262 91177308-0d34-0410-b5e6-96231b3b80d8
    gribozavr committed Dec 30, 2012
  4. Don't get confused if a extern "C" builtin function is redeclared wit…

    …hout
    
    the extern "C".
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171260 91177308-0d34-0410-b5e6-96231b3b80d8
    espindola committed Dec 30, 2012
  5. Remove the Function::getFnAttributes method in favor of using the Att…

    …ributeSet
    
    directly.
    
    This is in preparation for removing the use of the 'Attribute' class as a
    collection of attributes. That will shift to the AttributeSet class instead.
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171254 91177308-0d34-0410-b5e6-96231b3b80d8
    isanbard committed Dec 30, 2012
Commits on Dec 29, 2012
  1. Don't warn for undefined but used decls that are external because of …

    …a typedef.
    
    This fixes pr14736. It is fairly ugly, but I don't think we can do much better
    as we have to wait at least until the end of the typedef to know if the
    function will have external linkage or not.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171240 91177308-0d34-0410-b5e6-96231b3b80d8
    espindola committed Dec 29, 2012
  2. ArrayRefize CXXTryStmt.

    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171239 91177308-0d34-0410-b5e6-96231b3b80d8
    nico committed Dec 29, 2012
  3. ArrayRefize a CompoundStmt constructor.

    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171238 91177308-0d34-0410-b5e6-96231b3b80d8
    nico committed Dec 29, 2012
  4. Fix a typo that caused a few standard library implementations of sort to

    get the wrong answer. Wasn't caught by my implementation sadly...
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171222 91177308-0d34-0410-b5e6-96231b3b80d8
    chandlerc committed Dec 29, 2012
  5. Try to re-structure the GCCVersion comparison routine to make it easier

    to read and tell that it is a SWO -- we now descend through the
    components and return a result at the first inequal component.
    
    Also comment it a bit better and make it a total ordering by sorting on
    the text of the suffix if necessary.
    
    None of this should really be a visible change.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171219 91177308-0d34-0410-b5e6-96231b3b80d8
    chandlerc committed Dec 29, 2012
  6. Removed duplicate logic.

    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171218 91177308-0d34-0410-b5e6-96231b3b80d8
    Erik Verbruggen committed Dec 29, 2012
  7. Minor cleanup.

    DS parameter  has a default (null) value anyway, so there's no need for an
    if/else here.
    Patch by Nikola Smiljanić.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171210 91177308-0d34-0410-b5e6-96231b3b80d8
    espindola committed Dec 29, 2012
Commits on Dec 28, 2012
  1. Reject overloading of two static extern C functions.

    This patch moves hasCLanguageLinkage to be VarDecl and FunctionDecl methods
    so that they can be used from SemaOverload.cpp and then fixes the logic
    in Sema::IsOverload.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171193 91177308-0d34-0410-b5e6-96231b3b80d8
    espindola committed Dec 28, 2012
  2. Replace magic numbers in CheckICE with an enum.

    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171192 91177308-0d34-0410-b5e6-96231b3b80d8
    zygoloid committed Dec 28, 2012
  3. PR14729: Fix typo in CheckICE for BinaryConditionalOperators.

    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171191 91177308-0d34-0410-b5e6-96231b3b80d8
    zygoloid committed Dec 28, 2012
  4. Improve diagnostic wording for when an implicitly-deleted special member

    function is selected by overload resolution.
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171190 91177308-0d34-0410-b5e6-96231b3b80d8
    zygoloid committed Dec 28, 2012
  5. Add proper support for -fsanitize-blacklist= flag for TSan and MSan. …

    …Clang part.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171184 91177308-0d34-0410-b5e6-96231b3b80d8
    Alexey Samsonov committed Dec 28, 2012
  6. Change this to an IR test instead of an assembly test (as per comment…

    … in r171134).
    
    This makes the test not dependent on LLVM & won't vary/break based on LLVM
    codegen related changes. Appropriately testing at the Clang level what was
    fixed at the Clang level originally (in r124210).
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171175 91177308-0d34-0410-b5e6-96231b3b80d8
    dwblaikie committed Dec 28, 2012
Commits on Dec 27, 2012
  1. Simplify typeid 'potentially evaluated' check.

    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171162 91177308-0d34-0410-b5e6-96231b3b80d8
    zygoloid committed Dec 27, 2012
  2. Implement dcl.link paragraph 5.

    The language linkage of redeclarations must match. GCC was already reporting
    an error for this.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171139 91177308-0d34-0410-b5e6-96231b3b80d8
    espindola committed Dec 27, 2012
  3. Update test for backend change.

    TODO: This test should be moved to the backend.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171134 91177308-0d34-0410-b5e6-96231b3b80d8
    echristo committed Dec 27, 2012
Commits on Dec 26, 2012
  1. Fix a regression from the previous commit.

    Template instantiation can set the canonical decl to used after subsequent
    decls have been chained, so we have to check that too.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171088 91177308-0d34-0410-b5e6-96231b3b80d8
    espindola committed Dec 26, 2012
  2. Use the most recent redecl to decide if it is needed.

    This fixes pr14691, which I think is a regression from r168519.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171077 91177308-0d34-0410-b5e6-96231b3b80d8
    espindola committed Dec 26, 2012
Commits on Dec 25, 2012
  1. Produce an actual error before attempting to attach notes to it when …

    …bailing out
    
    due to FORCE_CLANG_DIAGNOSTICS_CRASH=1. Also add a test for that env var.
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171074 91177308-0d34-0410-b5e6-96231b3b80d8
    zygoloid committed Dec 25, 2012
  2. Fix for PR12222.

    Changed getLocStart() and getLocEnd() to be required for Stmts, and make
    getSourceRange() optional. The default implementation for getSourceRange()
    is build the range by calling getLocStart() and getLocEnd().
    
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171067 91177308-0d34-0410-b5e6-96231b3b80d8
    Erik Verbruggen committed Dec 25, 2012
  3. Add intel_ocl_bicc calling convention as a function attribute to clan…

    …g. The calling convention is already implemented in LLVM.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171056 91177308-0d34-0410-b5e6-96231b3b80d8
    Guy Benyei committed Dec 25, 2012
  4. Add 171048 back but invalidate the cache of all redeclarations when s…

    …etting
    
    the body of a functions. The problem was that hasBody looks at the entire chain
    and causes problems to -fvisibility-inlines-hidden if the cache was not
    invalidated.
    
    Original message:
    
    Cache visibility of decls.
    
    This unifies the linkage and visibility caching. I first implemented this when
    working on pr13844, but the previous fixes removed the performance advantage of
    this one.
    This is still a step in the right direction for making linkage and visibility
    cheap to use.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171053 91177308-0d34-0410-b5e6-96231b3b80d8
    espindola committed Dec 25, 2012
  5. Revert r171048, "Cache visibility of decls."

    It broke stage2.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171050 91177308-0d34-0410-b5e6-96231b3b80d8
    chapuni committed Dec 25, 2012
  6. Cache visibility of decls.

    This unifies the linkage and visibility caching. I first implemented this when
    working on pr13844, but the previous fixes removed the performance advantage of
    this one.
    
    This is still a step in the right direction for making linkage and visibility
    cheap to use.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171048 91177308-0d34-0410-b5e6-96231b3b80d8
    espindola committed Dec 25, 2012
Commits on Dec 24, 2012
  1. Simplify RUN lines. No functionality change.

    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171045 91177308-0d34-0410-b5e6-96231b3b80d8
    nlewycky committed Dec 24, 2012
  2. Let clang-format format itself.

    Apply all formatting changes that clang-format would apply to its own source
    code. All choices seem to improve readability (or at least not make it worse).
    No functional changes.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171039 91177308-0d34-0410-b5e6-96231b3b80d8
    djasper committed Dec 24, 2012
  3. Penalize tokens with a lower parenthesis level than the start of the …

    …line.
    
    This prevents formattings like this (assuming "parameter" doesn't fit the line):
      bool f = someFunction() && someFunctionWithParam(
          parameter) && someOtherFunction();
    
    Here, "parameter" - the start of line 2 - has a parenthesis level of 2, but
    there are subsequent tokens ("&&" and "someOtherFunction") with a lower level.
    This is bad for readability as "parameter" hides "someOtherFunction". With this
    patch, this changes to:
      bool f = someFunction() &&
               someFunctionWithParam(parameter) &&
               someOtherFunction();
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171038 91177308-0d34-0410-b5e6-96231b3b80d8
    djasper committed Dec 24, 2012
  4. Align RHS after assignments and return statements.

    This changes:
      int Result = a +  // force break
          b;
      return Result +  // force break
          5;
    
    To:
      int Result = a +  // force break
                   b;
      return Result +  // force break
             5;
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171032 91177308-0d34-0410-b5e6-96231b3b80d8
    djasper committed Dec 24, 2012