1. Jun 26, 2023
  2. Jun 25, 2023
    • Florian Hahn's avatar
      [ConstraintElim] Add uses to remark tests to make it more robust. · 3e4820b9
      Florian Hahn authored
      Add uses of conditions, so the test keeps testing what it is meant to
      test after D153660.
      3e4820b9
    • Takuya Shimizu's avatar
      [clang][Diagnostics] Provide parameter source range to arity-mismatch notes · 409a8097
      Takuya Shimizu authored
      Consider the following piece of code:
      ```
      void func( int aa,
                 int bb,
                 int cc) {}
      
      void arity_mismatch() {
        func(2, 4);
      }
      ```
      BEFORE:
      ```
      source.cpp:6:3: error: no matching function for call to 'func'
          6 |   func(2, 4);
            |   ^~~~
      source.cpp:1:6: note: candidate function not viable: requires 3 arguments, but 2 were provided
          1 | void func( int aa,
            |      ^
      ```
      AFTER:
      ```
      source.cpp:6:3: error: no matching function for call to 'func'
          6 |   func(2, 4);
            |   ^~~~
      source.cpp:1:6: note: candidate function not viable: requires 3 arguments, but 2 were provided
          1 | void func( int aa,
            |      ^     ~~~~~~~
          2 |            int bb,
            |            ~~~~~~~
          3 |            int cc) {}
            |            ~~~~~~
      ```
      
      Reviewed By: cjdb, aaron.ballman
      
      Differential Revision: https://reviews.llvm.org/D153267
      409a8097
    • Elliot Goodrich's avatar
      b3c8554f
    • Elliot Goodrich's avatar
      [llvm] Move StringExtras.h include from Error.h to Error.cpp · 2fa0dbd7
      Elliot Goodrich authored
      Move the implementation of the `toString` function from
      `llvm/Support/Error.h` to the source file, which allows us to move
      `#include "llvm/ADT/StringExtras.h"` to the source file as well.
      
      As `Error.h` is present in a large number of translation units this
      means we are unnecessarily bringing in the contents of
      `StringExtras.h` - itself a large file with lots of includes - and
      slowing down compilation.
      
      Also move the `#include "llvm/ADT/SmallVector.h"` directive to the
      source file as it's no longer needed, but this does not give as much of
      a benefit.
      
      This reduces the total number of preprocessing tokens across the LLVM
      source files in lib from (roughly) 1,920,413,050 to 1,903,629,230 - a
      reduction of ~0.87%. This should result in a small improvement in
      compilation time.
      
      Differential Revision: https://reviews.llvm.org/D153229
      2fa0dbd7
    • Elliot Goodrich's avatar
      [llvm] Add missing StringExtras.h includes · b0abd489
      Elliot Goodrich authored
      In preparation for removing the `#include "llvm/ADT/StringExtras.h"`
      from the header to source file of `llvm/Support/Error.h`, first add in
      all the missing includes that were previously included transitively
      through this header.
      b0abd489