[clang-tools-extra] Fix #35272: Don't replace typedefs in extern c scope (PR #69102)
    Piotr Zegar via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Sun Oct 22 12:42:46 PDT 2023
    
    
  
================
@@ -28,6 +28,15 @@ After:
   using R_t = struct { int a; };
   using R_p = R_t*;
 
+The checker ignores `typedef` within `extern "C" { ... }` blocks.
----------------
PiotrZSL wrote:
I think so, for example I would like to enable this for my projects.
Ignoring extern "C" makes only sense if same header is compile in C and C++ mode.
If header is compiled only in C++ mode, but uses extern "C" simply to properly handle symbols mangling, then there is no need to ignore such typedefs.
https://github.com/llvm/llvm-project/pull/69102
    
    
More information about the cfe-commits
mailing list