[clang] [Clang][Sema] Fix regression due to missing ambiguity check before attempting access check. (PR #80730)

via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 5 11:18:51 PST 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 5942868a215ce4dbd927a7f0b06432e1eeaed698 16968712c7caa38c80c6e8ac4db0e318511aaa99 -- clang/include/clang/Sema/Lookup.h clang/test/CXX/class.derived/class.member.lookup/p11.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/include/clang/Sema/Lookup.h b/clang/include/clang/Sema/Lookup.h
index d325e394c1..2f2f2607a9 100644
--- a/clang/include/clang/Sema/Lookup.h
+++ b/clang/include/clang/Sema/Lookup.h
@@ -754,7 +754,8 @@ public:
 
 private:
   void diagnoseAccess() {
-    if (!isAmbiguous() && isClassLookup() && getSema().getLangOpts().AccessControl)
+    if (!isAmbiguous() && isClassLookup() &&
+        getSema().getLangOpts().AccessControl)
       getSema().CheckLookupAccess(*this);
   }
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/80730


More information about the cfe-commits mailing list