[PATCH] D60523: [clang] Don't segfault on incorrect using directive (PR41400)
Gauthier via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 24 13:11:15 PDT 2019
Tyker added a subscriber: jkooker.
Tyker added a comment.
i don't think it is possible for `ASTContext::getDependentNameType` to deal with `NSS = nullptr` except by reporting the error. we probably don't want to just report the error because the error could have been handled before invoking `ASTContext::getDependentNameType`.
and i agree that it should be reflected in the interface of those functions because pointer are often used a optional references. but wouldn't an assert + doxygen comment suffice ? instead of changing the interface, implementation and all callsites. Pointers as argument that are required not to be null are used in a lot of places in LLVM. for example `DependentNameType::DependentNameType` takes NNS as a pointer even thought it requires it to be non-null(calls a method on it). mixing pointers and references adds a lot of `&` and `*` which makes the code harder to read.
CHANGES SINCE LAST ACTION
More information about the cfe-commits