mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Initial batch of AST matchers. (#953)
Also fixes an issue where llvm casts wouldn't work on AstNode.
This commit is contained in:
@@ -16,7 +16,7 @@ namespace Carbon {
|
||||
class SourceLocation {
|
||||
public:
|
||||
// The filename should be eternal or arena-allocated to eliminate copies.
|
||||
SourceLocation(const char* filename, int line_num)
|
||||
constexpr SourceLocation(const char* filename, int line_num)
|
||||
: filename_(filename), line_num_(line_num) {}
|
||||
SourceLocation(Nonnull<const std::string*> filename, int line_num)
|
||||
: filename_(filename->c_str()), line_num_(line_num) {}
|
||||
|
||||
Reference in New Issue
Block a user