[all-commits] [llvm/llvm-project] 4a32a4: [clang] Fix two gcc warnings about unused variable...

mikaelholmen via All-commits all-commits at lists.llvm.org
Thu Feb 15 01:33:29 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4a32a414ee07bf15c47ba7fb7286d968e73a04fe
      https://github.com/llvm/llvm-project/commit/4a32a414ee07bf15c47ba7fb7286d968e73a04fe
  Author: Mikael Holmen <mikael.holmen at ericsson.com>
  Date:   2024-02-15 (Thu, 15 Feb 2024)

  Changed paths:
    M clang/lib/Driver/Driver.cpp
    M clang/lib/Sema/SemaDecl.cpp

  Log Message:
  -----------
  [clang] Fix two gcc warnings about unused variables [NFC]

Without the fix gcc warns like
 ../../clang/lib/Sema/SemaDecl.cpp:2963:24: warning: unused variable 'SupA' [-Wunused-variable]
  2963 |   else if (const auto *SupA = dyn_cast<SuppressAttr>(Attr))
       |                        ^~~~
and
 ../../clang/lib/Driver/Driver.cpp:4192:17: warning: unused variable 'IAA' [-Wunused-variable]
  4192 |       if (auto *IAA = dyn_cast<InstallAPIJobAction>(Current)) {
       |                 ^~~

Remove the unused variables and change the "dyn_cast"s into "isa"s.




More information about the All-commits mailing list