[all-commits] [llvm/llvm-project] 00b89f: [clang][NFC] Remove spurious +x flag on DeclTempla...

Bruno Ricci via All-commits all-commits at lists.llvm.org
Wed Aug 5 05:55:45 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 00b89f66f988e9ec6f366ed46a51ace39fac07c8
      https://github.com/llvm/llvm-project/commit/00b89f66f988e9ec6f366ed46a51ace39fac07c8
  Author: Bruno Ricci <riccibrun at gmail.com>
  Date:   2020-08-05 (Wed, 05 Aug 2020)

  Changed paths:
    M clang/include/clang/AST/DeclTemplate.h
    M clang/lib/AST/DeclTemplate.cpp

  Log Message:
  -----------
  [clang][NFC] Remove spurious +x flag on DeclTemplate.cpp and DeclTemplate.h


  Commit: 98b4b4570542a255e9a81e4a349183402a2d478d
      https://github.com/llvm/llvm-project/commit/98b4b4570542a255e9a81e4a349183402a2d478d
  Author: Bruno Ricci <riccibrun at gmail.com>
  Date:   2020-08-05 (Wed, 05 Aug 2020)

  Changed paths:
    M clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp

  Log Message:
  -----------
  [clang][NFC] Add a test showcasing an unnamed template parameter in a diagnostic


  Commit: bc29634b93acf2e55c82dd906f0d9af196c66ff3
      https://github.com/llvm/llvm-project/commit/bc29634b93acf2e55c82dd906f0d9af196c66ff3
  Author: Bruno Ricci <riccibrun at gmail.com>
  Date:   2020-08-05 (Wed, 05 Aug 2020)

  Changed paths:
    M clang/include/clang/AST/DeclTemplate.h

  Log Message:
  -----------
  [clang][NFC] Remove an old workaround for MSVC 2013


  Commit: 6f2fa9d312fcea2448706a8e410c7bc1b6436ea7
      https://github.com/llvm/llvm-project/commit/6f2fa9d312fcea2448706a8e410c7bc1b6436ea7
  Author: Bruno Ricci <riccibrun at gmail.com>
  Date:   2020-08-05 (Wed, 05 Aug 2020)

  Changed paths:
    M clang/include/clang/AST/Decl.h

  Log Message:
  -----------
  [clang][NFC] Document NamedDecl::printName


  Commit: 19701458d4691ee7ec59e5aa7217a479b0fb10e7
      https://github.com/llvm/llvm-project/commit/19701458d4691ee7ec59e5aa7217a479b0fb10e7
  Author: Bruno Ricci <riccibrun at gmail.com>
  Date:   2020-08-05 (Wed, 05 Aug 2020)

  Changed paths:
    M clang-tools-extra/clang-include-fixer/find-all-symbols/FindAllSymbols.cpp
    M clang-tools-extra/clang-move/HelperDeclRefGraph.cpp
    M clang-tools-extra/clang-move/Move.cpp
    M clang/lib/AST/ASTDiagnostic.cpp
    M clang/lib/AST/Interp/Disasm.cpp
    M clang/lib/AST/TextNodeDumper.cpp
    M clang/lib/Frontend/FrontendAction.cpp
    M clang/lib/Index/FileIndexRecord.cpp
    M clang/lib/Sema/AnalysisBasedWarnings.cpp
    M clang/lib/Sema/SemaChecking.cpp
    M clang/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/FuchsiaHandleChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/MoveChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp
    M clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp
    M clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
    M clang/lib/Tooling/Refactoring/ASTSelection.cpp
    M clang/test/Index/error-on-deserialized.c
    M clang/test/SemaCXX/warn-msvc-enum-bitfield.cpp

  Log Message:
  -----------
  [clang][nearly-NFC] Remove some superfluous uses of NamedDecl::getNameAsString

`OS << ND->getDeclName();` is equivalent to `OS << ND->getNameAsString();`
without the extra temporary string.

This is not quite a NFC since two uses of `getNameAsString` in a
diagnostic are replaced, which results in the named entity being
quoted with additional "'"s (ie: 'var' instead of var).


  Commit: 94b43118e2203fed8ca0377ae762c08189aa6f3d
      https://github.com/llvm/llvm-project/commit/94b43118e2203fed8ca0377ae762c08189aa6f3d
  Author: Bruno Ricci <riccibrun at gmail.com>
  Date:   2020-08-05 (Wed, 05 Aug 2020)

  Changed paths:
    M clang/include/clang/AST/Type.h
    M clang/lib/AST/Type.cpp

  Log Message:
  -----------
  [clang][NFCI] Get rid of ConstantMatrixTypeBitfields to avoid increasing the size of every type.

sizeof(ConstantMatrixTypeBitfields) > 8 which increases the size of every type.
This was not detected because no corresponding static_assert for its size was
added.

To prevent this from occuring again replace the various static_asserts for
the size of each of the bit-field classes by a single static_assert for the
size of Type.

I have left ConstantMatrixType::MaxElementsPerDimension unchanged since
the limit is exercised by multiple tests.


  Commit: f7a039de7af7b83105f3e0345d65dceda1a0e0d4
      https://github.com/llvm/llvm-project/commit/f7a039de7af7b83105f3e0345d65dceda1a0e0d4
  Author: Bruno Ricci <riccibrun at gmail.com>
  Date:   2020-08-05 (Wed, 05 Aug 2020)

  Changed paths:
    M clang/lib/AST/DeclPrinter.cpp
    M clang/unittests/AST/DeclPrinterTest.cpp

  Log Message:
  -----------
  [clang][NFC] DeclPrinter: use NamedDecl::getDeclName instead of NamedDecl::printName to print the name of enumerations, namespaces and template parameters.

NamedDecl::printName will print the pretty-printed name of the entity, which
is not what we want here (we should print "enum { e };" instead of "enum
(unnamed enum at input.cc:1:5) { e };").

For now only DecompositionDecl and MDGuidDecl have an overloaded printName so
this does not result in any functional change, but this change is needed since
I will be adding overloads to better handle unnamed entities in diagnostics.


Compare: https://github.com/llvm/llvm-project/compare/4e491570b5ec...f7a039de7af7


More information about the All-commits mailing list