[clang] [llvm] [clang] Initial frontend C-restrict support (PR #173394)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 12 06:34:13 PST 2026


================
@@ -742,6 +742,10 @@ class LangOptions : public LangOptionsBase {
            DefaultVisiblityExportMapping::All;
   }
 
+  bool IsCLanguageOnly() const {
+    return ((C99 || C11 || C17 || C23 || C2y) && !ObjC && !OpenMP);
----------------
erichkeane wrote:

instead of the first
```suggestion
    return (!CPlusPlus && !ObjC && !OpenMP);
```

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


More information about the cfe-commits mailing list