Call getLocation() on decls to check isWrittenInMainFile()