Unverified Commit c609211d authored by Fred Tingaud's avatar Fred Tingaud Committed by GitHub
Browse files

[clang] Fix isInStdNamespace for Decl flagged extern c++ (#81776)

The MSVC STL implementation declares multiple classes using:

```cpp
namespace std {
  extern "C++" class locale {
    ...
  };
}
```

`isInStdNamespace` uses the first DeclContext to check whether a Decl is
inside the `std` namespace. Here, the first DeclContext of the `locale`
Decl is a LinkageSpecDecl so the method will return false.
We need to skip this LinkageSpecDecl to find the first DeclContext of
type Namespace and actually check whether we're in the `std` namespace.
parent 513e4dc1
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment