Tyker added a subscriber: jkooker. Tyker added a comment. @jkooker 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.
Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60523/new/ https://reviews.llvm.org/D60523 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits