Skip to content
Snippets Groups Projects
  1. Sep 14, 2016
  2. Sep 13, 2016
  3. Sep 12, 2016
  4. Sep 09, 2016
  5. Sep 08, 2016
  6. Sep 07, 2016
    • George Burgess IV's avatar
      [Sema] Compare bad conversions in overload resolution. · 2cef254a
      George Burgess IV authored
      r280553 introduced an issue where we'd emit ambiguity errors for code
      like:
      
      ```
      void foo(int *, int);
      void foo(unsigned int *, unsigned int);
      
      void callFoo() {
        unsigned int i;
        foo(&i, 0); // ambiguous: int->unsigned int is worse than int->int,
                    // but unsigned int*->unsigned int* is better than
                    // int*->int*.
      }
      ```
      
      This patch fixes this issue by changing how we handle ill-formed (but
      valid) implicit conversions. Candidates with said conversions now always
      rank worse than candidates without them, and two candidates are
      considered to be equally bad if they both have these conversions for
      the same argument.
      
      Additionally, this fixes a case in C++11 where we'd complain about an
      ambiguity in a case like:
      
      ```
      void f(char *, int);
      void f(const char *, unsigned);
      void g() { f("abc", 0); }
      ```
      
      ...Since conversion to char* from a string literal is considered
      ill-formed in C++11 (and deprecated in C++03), but we accept it as an
      extension.
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@280847 91177308-0d34-0410-b5e6-96231b3b80d8
      2cef254a
    • Yaxun Liu's avatar
      Do not validate pch when -fno-validate-pch is set · 2807f026
      Yaxun Liu authored
      There is a bug causing pch to be validated even though -fno-validate-pch is set. This patch fixes it.
      
      ASTReader relies on ASTReaderListener to initialize SuggestedPredefines, which is required for compilations using PCH. Before this change, PCHValidator is the default ASTReaderListener. After this change, when -fno-validate-pch is set, PCHValidator is disabled, but we need a replacement ASTReaderListener to initialize SuggestedPredefines. Class SimpleASTReaderListener is implemented for this purpose.
      
      This change only affects -fno-validate-pch. There is no functional change if -fno-validate-pch is not set.
      
      If -fno-validate-pch is not set, conflicts in predefined macros between pch and current compiler instance causes error.
      
      If -fno-validate-pch is set, predefine macros in current compiler override those in pch so that compilation can continue.
      
      Differential Revision: https://reviews.llvm.org/D24054
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@280842 91177308-0d34-0410-b5e6-96231b3b80d8
      2807f026
    • Vassil Vassilev's avatar
      Add missing include. White space. · 99ad38fd
      Vassil Vassilev authored
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@280827 91177308-0d34-0410-b5e6-96231b3b80d8
      99ad38fd
    • Reid Kleckner's avatar
      Parsing MS pragma intrinsic · 7dee30fb
      Reid Kleckner authored
      Parse pragma intrinsic, display warning if the function isn't a builtin
      function in clang and suggest including intrin.h.
      
      Patch by Albert Gutowski!
      
      Reviewers: aaron.ballman, rnk
      
      Subscribers: aaron.ballman, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D23944
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@280825 91177308-0d34-0410-b5e6-96231b3b80d8
      7dee30fb
    • Matt Arsenault's avatar
      OpenCL: Defining __ENDIAN_LITTLE__ and fix target endianness · f144d8ba
      Matt Arsenault authored
      OpenCL requires __ENDIAN_LITTLE__ be set for little endian targets.
      The default for targets was also apparently big endian, so AMDGPU
      was incorrectly reported as big endian. Set this from the triple
      so targets don't have another place to set the endianness.
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@280787 91177308-0d34-0410-b5e6-96231b3b80d8
      f144d8ba
  7. Sep 04, 2016
  8. Sep 03, 2016
Loading